# Public-URL speed issues

**URL:** <https://forums.balena.io/t/public-url-speed-issues/509>\
**Category:** Product support\
**Created:** [January 17, 2017, 11:01am UTC](https://forums.balena.io/t/public-url-speed-issues/509 "2017-01-17T11:01:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonkemper](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/simonkemper/32/128_2.png) [@simonkemper](https://forums.balena.io/u/simonkemper)\
**Post date:** [January 17, 2017, 11:01am UTC](https://forums.balena.io/t/public-url-speed-issues/509/1 "2017-01-17T11:01:55Z")

</div>

I am referring to the following:

> [@Resin.io Javascript SDK in the browser](https://forums.balena.io/t/resin-io-javascript-sdk-in-the-browser/500/2):
>
> webURLs are painfully slow for an image feed so it’s nowhere near realtime. We hope to fix that soon.

In fact the Public-URL forwarding at some days seems to be very slow. And on some days it’s a bit faster. Mostly it has problems with forwarding JS-Libraries that are hosted on the devices.

Does anyone else experience this?

The Author of the topics says “We hope to fix that soon.” - Does this refer to “streaming of images” or to the public-url system at all?

I recently tried to use a different service: [https://ngrok.com](https://ngrok.com) - Which offers the same tunneling of device specific network stuff but is A LOT faster. Especially when using their EU-Servers (we are within the EU) all requests are almost instantly returned.

---

<div class="post-metadata">

**Author:** ![imrehg](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imrehg/32/36_2.png) [@imrehg](https://forums.balena.io/u/imrehg)\
**Post date:** [January 17, 2017, 2:08pm UTC](https://forums.balena.io/t/public-url-speed-issues/509/2 "2017-01-17T14:08:55Z")

</div>

ngrok is cool, I’ve been trying that with some Alexa Skills (which also need publicly accessible URLs). It has the advantage indeed that you can choose servers near to you. It does cost some money for the service, though, and not sure how does it scale in the `N_devices >> N_users` user case, it seems to be more tailored towards equal number of devices and users (but I might get that wrong) 🔦

I’m guessing @craig means improvements with Device Public URLs, but will check. Lot of our services go through the US East Coast at the moment, while used quite globally, and it does seem like a bottleneck (similar to what you’ve mentioned on the [chat yesterday](https://gitter.im/resin-io/chat?at=587d2999e836bf701050199d)).

Will post here anything that comes up regarding any improvements!

---

<div class="post-metadata">

**Author:** ![mccollam](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mccollam/32/88_2.png) [@mccollam](https://forums.balena.io/u/mccollam)\
**Post date:** [January 19, 2017, 2:12pm UTC](https://forums.balena.io/t/public-url-speed-issues/509/3 "2017-01-19T14:12:35Z")

</div>

You can also add your own functionality for this fairly easily by setting up your own VPN or even using something like [reverse ssh tunneling](https://www.howtoforge.com/reverse-ssh-tunneling) (though you’d want to wrap that in a script to bring the connection back up if it goes down).

Doing these mean you’re not taking an additional hop through the [resin.io](http://resin.io) infrasturcture, which could speed things up quite a bit depending on where in the world you and your device are.

---

<div class="post-metadata">

**Author:** ![imrehg](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imrehg/32/36_2.png) [@imrehg](https://forums.balena.io/u/imrehg)\
**Post date:** [January 19, 2017, 3:25pm UTC](https://forums.balena.io/t/public-url-speed-issues/509/4 "2017-01-19T15:25:01Z")

</div>

Ah, this would be very cool to package up as some example projects. 🙂

---

<div class="post-metadata">

**Author:** ![mccollam](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mccollam/32/88_2.png) [@mccollam](https://forums.balena.io/u/mccollam)\
**Post date:** [January 19, 2017, 3:41pm UTC](https://forums.balena.io/t/public-url-speed-issues/509/5 "2017-01-19T15:41:17Z")

</div>

Hah, hint taken. Maybe I can make this a Hack Friday. 🙂

---

<div class="post-metadata">

**Author:** ![simonkemper](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/simonkemper/32/128_2.png) [@simonkemper](https://forums.balena.io/u/simonkemper)\
**Post date:** [January 19, 2017, 6:44pm UTC](https://forums.balena.io/t/public-url-speed-issues/509/6 "2017-01-19T18:44:05Z")

</div>

> [@imrehg](#):
>
> and not sure how does it scale in the N\_devices \>\> N\_users user case

ngrok has a solution for this called “ngrok link” which is tailored for IoT devices an a different kind of connection where a single device might have multiple connections at a time

@mccollam Thanks for letting me know this → The point about the VPN is quite interesting

---

<div class="post-metadata">

**Author:** ![imrehg](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imrehg/32/36_2.png) [@imrehg](https://forums.balena.io/u/imrehg)\
**Post date:** [January 19, 2017, 6:51pm UTC](https://forums.balena.io/t/public-url-speed-issues/509/7 "2017-01-19T18:51:31Z")

</div>

I see, that looks interesting, cheers! Here’s a direct link to it, just in case: [https://ngrok.com/product/ngrok-link](https://ngrok.com/product/ngrok-link)

---

<div class="post-metadata">

**Author:** ![simonkemper](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/simonkemper/32/128_2.png) [@simonkemper](https://forums.balena.io/u/simonkemper)\
**Post date:** [January 19, 2017, 7:21pm UTC](https://forums.balena.io/t/public-url-speed-issues/509/8 "2017-01-19T19:21:16Z")

</div>

Here’s a “speed-test” of Resins Public-URL vs. NGROK Tunneling - just in case:

> [@Connecting a self-hosted VPN](https://forums.balena.io/t/connecting-a-self-hosted-vpn/517/6):
>
> @mccollam @imrehg The following might be interesting for you, too. I’ve managed to set up [ngrok.io](http://ngrok.io) from within a container and ran a small Flask Application that communicates over Web Sockets (SocketIO) and sends a ping from the server to the browser. The browser returns it and the average time this takes is being measured: Here’s the result: On the left you can see the flask page and the ping/pong being send through resins public-url. Result is about ~350ms. On the right the same b…

---

<div class="post-metadata">

**Author:** ![mccollam](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mccollam/32/88_2.png) [@mccollam](https://forums.balena.io/u/mccollam)\
**Post date:** [January 19, 2017, 7:43pm UTC](https://forums.balena.io/t/public-url-speed-issues/509/9 "2017-01-19T19:43:14Z")

</div>

Actually I had a break between meetings and needed something to clear my head a bit, so I knocked together a very simple example of ssh tunneling: [https://github.com/resin-io-playground/simple-ssh-tunnel/](https://github.com/resin-io-playground/simple-ssh-tunnel/)

I haven’t tested it extensively but it Works For Me™ with the Raspberry Pi 3 sitting next to me on my desk.

(Please note that as I call out in the README, this is an example and not something that should be run in production! There’s no real error checking and while I tried to be reasonable in my approach to security, it could be way more locked down.)

---

<div class="post-metadata">

**Author:** ![lekkas](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/lekkas/32/78_2.png) [@lekkas](https://forums.balena.io/u/lekkas)\
**Post date:** [March 29, 2018, 10:44am UTC](https://forums.balena.io/t/public-url-speed-issues/509/10 "2018-03-29T10:44:27Z")

</div>

Hey @simonkemper,

We have performed a few VPN infrastructure updates recently which should reduce the latency in Device URLS as well as improve SSH speed through the [Web terminal](https://docs.resin.io/learn/manage/ssh-access/#using-the-dashboard-web-terminal) and [resin ssh](https://docs.resin.io/learn/manage/ssh-access/#using-resin-ssh-from-the-cli).

Please let us know if you see any noticeable improvements from your side.

Best, Kostas
