Hi TCP users,
Currently, I have a homelab server that runs Jellyfin with direct access to local media content and a reverse proxy point to it. While it works well for people in Europe (where the server is), it is quite slow for some of my friends who are living in Asia. I am having some options in mind:
- Hire a VPS in Asia and set up another Jellyfin instance there. This works but I don’t really want to have two Jellyfin instances with two databases and also accessing to local media content will be curbersome to manage.
- Hire a VPS in Asia and set up a CDN but I am not sure if it will ever work with Jellyfin ?
So I would like to ask do you know any things about this and any idea to improve this situation ?
Thank you very much!
Edit: Thanks for all of your response. Based on my experience, I think the slowness is caused by the fact that there are too many hops to jump through before reaching the final client. So I think I will try to do several things:
- Try to optimize my upload speed, it is fast enough but not very stable recently so it could have some impact
- Set up a second Jellyfin instance and sync a part of my library there for my friends.
Edit: Slow here means both slow page loading and slow buffering.
You’re describing a CDN. You can’t afford it.
I’d look more into boosting whatever your uplink is versus trying to distribute to localized users.
So it’s not just me. The peering between europe and asia IS crap!
I’ve been to thailand in november and the connections to europe were hit or miss the whole time. The latency was poor and the reliability varied day by day.
The only thing that made any difference was switching providers on the EU side. It seems that some ISPs have better peering than others.
Also lowering the MTU for the vpn tunnel seemd to help a lot, but that might’ve been a placebo.
I’ve often described Europe as being the ‘other end of the internet’ since from Australia it’s often routed over the Pacific to US(via Hawaii and either Guam or New Zealand), over the US, then over the Atlantic.
tu.berlin is 316ms away.
Even large streaming services drop their servers close to the users to make the experience good. They just do better at scaling.
You could federated authentication so only one ldap service is maintained. You could also sync media from one device to the other so you don’t need to manually update both.
You unfortunately cannot solve this yourself, this is where 800lb gorillas like akamai outclass self-hosted.
Netflix alone has many thousands of isps participating in Open Connect alone, these providing CDN peering points all over the world and making Netflix only a few hops away for more end users.
Tailscale, headscale, or something along those lines may help optimize the route but as others have said to resolve this is an actual fashion you’d need a cdn which requires significant geo-redundant hardware which comes at a pretty significant cost. That being said I think your friend has a good shot if you implement the former.
I was trying to stream my Jellyfin server on vacation…Over Tailnet I couldn’t reliably stream anything. Over VPN it was as good as local. I can’t believe it’s just a routing issue but I wasn’t proxied so it should have been the same. So a VPN for one user might fix the issue. The headaches of segmenting the network on that VPN are another problem even if the hardware/router is capable but doable.
Is it possible you misconfigured your tailnet and instead of using a direct connection to your local subnet router you were using an ethereal port via a DERP relay? You can read into it more on tailscales documentation, but essentially you need to leave UPD inbound port 41641 open to your subnet router inbound from WAN.
I checked for relay. I recall it’s pretty easy to see on the desktop icon. I’ll have to try again next time I’m away to see.
Define “slow”. Pages hang before loading? Or it often stops to buffer a stream?
don’t know what “slow” means in your case, but jellyfin clients have a buffer setting and increasing it should improve things for them.
You don’t necessarily have to host another Jellyfin instance, I would find a server somewhere in-between the middle of your current Europe server and your Asian homies and setup a reverse proxy there and point it to your current Jellyfin instance.
The only hassle with this is you’re going to need a way to expose Jellyfin to the new server, a VPN would prevent port forwarding 443, perhaps split tunneling?
Not the most elegant solution but at least this way you can make an attempt at optimizing the connection.
Edit - (if you wanted to go the second Jellyfin instance route): Could also copy your current database to the second server, host a second Jellyfin instance and have something like sshfs or sftp sharing the directory to your media library, reverse proxy it as something like asia-jellyfin.your.domain and keep it separated from your Eu server.
This may be completely untrue but maybe the remote users could get a vpn with a server near yours? Without having the slightest idea that it does I could imagine it could help.