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.

  • stratself@lemdro.id
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 hours ago

    HI, kinda late to the party. I’m in a similar rut with intercontinental internet issues, and would like to share my thoughts

    While not a full-fledged CDN, you may consider setting up an Asian VPS to serve as a second reverse proxy/ingress route, terminate TLS there, and route plaintext HTTP back to your homelab (this virtual tunnel shall be behind a WireGuard VPN interface). As I’ve figured out in my blogpost here (see scenario 2), this allows the initial TCP and TLS handshakes to happen nearer to the user instead of going all the way to Europe and back home.

    Before renting compute, I suggest trying these smaller actions first - if they work you mightn’t need a VPS anymore:

    • Look into Linux sysctls tuning of network parameters. My personal tweaks for the /etc/sysctl.conf stuff are:
      • Increasing all the memory usage for network stuff (net.core.(rmem_max/wmem_max/rmem_default/wmem_default), net.ipv4.tcp_(mem,rmem,wmem)`. Relevant blogpost and another. YMMV
      • Enable BBR (net.ipv4.tcp_congestion_control=bbr), a modern congestion control algo suitable for long distance/high latency.
    • Implement some sort of Smart Queue Management on your router (e.g. CAKE algorithm) to avoid the bufferbloat problem
    • Enable HTTP/3+QUIC on your reverse proxy for reduced handshakes. Though it’s unlikely native Jellyfin clients also benefit from such features

    Curious to see if any of this helps :)