Cloudflare Tunnel is slow while Let's encrypt isn't. Need help on optimisation

I am using Cloudflared Tunnels for my unRAID server dockers. This is everything from Nextcloud to different others. Through the tunnel I only get 3-4 Mbps download and 20-35 Mbps upload. Through direct connection with Let’s Encrypt I get my full 100/100 bandwidth. Can anyone point me to the right direction on how to configure this correctly? Google just points me to a bunch of posts with the same problem and no solutions. Thanks in advance!

Hi there,

I was testing using your own web interface and got 4.3/85.2:

One thing you should remember is that when you measure it from this end of the tunnel, the download you get relates to the upload of your connection and the upload your download. If that makes sense…
So to better put it, if your ISP allows you 500down and 50up for instance, on this side of the tunnel you’d be able to get to a maximum of 50Mbps dl and 500Mbps up.

Another thing you might want to remember is that when using a tunnel, your traffic will always exit your internal network, while if you use an A record for instance pointing at your public IP address, after the DNS resolution, the traffic from your network trying to reach yourdomain.com will pretty much just get to the gateway and back to the host. So with this in mind, a better comparison would be to test it from outside your own network.

Finally, the way you have your docker container configured might also make a difference. Check Bridged VS Host VS Custom to see if it makes any difference in your case.

As a final note, I’m noticing that you have all your public hostnames resolving directly to the origin, I’m not sure if this is intended, but if you want to protect these hostnames by placing them behind a Cloudflare authentication page, take a look at Applications. (In ZT dashboard: Access > Applications)

Take care.

My bandwidth is 100/100Mbps. When I use DuckDNS for the same speedtest docker, i get my full transfer speeds. The tests I’ve done is always externally. For some reason the Cloudflared Tunnel is insanely slow no matter what. I find it really strange that this only happens with the tunnels, and I can’t wrap my head around why.

1 Like

Hi there,

I also use unraid and am able to get much closer to my real speed. It’s not exact of course but close.
For exact speed I use something similar to duckdns but to update a hostname in Cloudflare. Look up oznu/cloudflare-ddns if you’re interested in this duckdns alternative.

But getting back to your issue, I would check the container logs for issues or try another container - since you’re using unraid, you have a few to choose from directly in your apps tab.
There’s a chance it can be something in the cloudflared container itself limiting speed.
Take a look here:

and

If this is your case, I would advise you maybe to share it in unraid forums to see if someone can help you fix it.

Take care.

1 Like

Doesn’t seem to be a docker network issue. Tried changing stuff around and there was no difference. I am using a proxynet like in SpaceInvaderOne’s videos. To me this seems like a Tunnel issue, and I can’t figure out why.

I get the same issue while using a Cloudflare tunnel terrible download of around 5mbps, while my connection is asymmetric 900/140mbps. If keep everything the same other than changing to my own Wireguard tunnel to a MikroTik Router set up in AWS EC2 I see very acceptable speed topping out around 150/95mbps (to/from my service)

@mcorreia I am facing a similar issue and hope you can help.
I had some friends visit a few domains that I have all running on Cloudflare’s dns using Tunnels. I am based in Tokyo and latency is instant with the same domains.

Uk and (Canada one had an Argo 1033) but after a reload took a while to get to load the page. On a side not one domains that is proxied and served over http server (on prem same location and network as the other domains just not tunneled ) didn’t have the issue.

I have Kubernetes cluster setup with the a few domains tunneled. Are you able to look if I am missing any steps/config. domains that are pointed are rohanrehman.com and labs.tokyo.jp.
My Zero Trust Overview > Networks > Tunnels is listed as Healthy.

Once again the slowdown is when users not in Japan visit those domains that are tunneled.

I am assuming as per marketing that tunneling will give the same low latency as a poxied http website, and that the latency issues are configuration errors on my end.

Thanks!

A user in Chicago reported seeing “This Content is not yet published”.

I have the same issue when using tunnels.

I have issues on the speed with tunnels as well.
Are there any configurations we are missing??
I tested via my DDNS + port forwarding and no speed issues there.

change the container adapter to host and not the default bridge. the base command that cloudflare gives you for docker will automatically put it on the default bridge which is known to be slow and buggy. alternatively you can also create a new network which will work way better than the default bridge