3 ms·
I haven't been hugged by HN yet, but I've survived being featured on a couple other front pages long ago. It's easy if it's a lightweight page and you have som
by invalidator 5y ago
I haven't been hugged by HN yet, but I've survived being featured on a couple other front pages long ago.
It's easy if it's a lightweight page and you have something faster than a 486. If it's heavy (lots of images, videos, downloads, etc) you can run out of bandwidth pretty quickly. However, that doesn't necessarily sink the ship!
Traffic shaping makes a big difference. Without it, the modem buffer quickly fills causing multi-second ping times. This easily leads to congestion collapse. TCP grows the receive window to large values, and the congestion avoidance algorithm doesn't do well when the feedback is delayed due to the latency. TCP starts sawtoothing, and you end up with occasional moments where a few pages get served, interspersed with so much loss that connections get dropped.
We used htb [1] which tightly controls the outbound traffic rate, preferring to drop packets instead of delay them. That prevents the modem's buffer from filling up, which keeps the latency down. This creates a smoother flow. Pages load slowly, but at least they keep loading, instead of wasting bandwidth on retries. It also prioritizes traffic: other services are guaranteed their minimum rates. We were using ssh through the line and didn't even realize we were getting hit until someone asked why the site was running slowly.
Newer algorithms are even better, especially for keeping jitter down, but htb is simple and vastly better than letting your router blast packets at full speed. OpenWRT and all the other open source router firmwares can do it these days. It improves things for even normal end-user uses, but if you're running a server at home, you really want to set up some QOS before someone hugs you to death.
[1] https://linux.die.net/man/8/tc-htb https://linux.die.net/man/8/tc-htb
- zekica 5y agoCodel, Fq_Codel and especially Cake are worth looking into.
- throwaway48375 5y agoI wish OPNsense had cake.
- mrg2k8 5y agoI used tc, CAKE and ifb for a small ISP router-on-a-stick implementation (around 2000 end-users) and it did wonders with the limited bandwidth I had to work with (around 3Gbps). More simple to configure than HTB, no more playing around with lots of knobs. Even during high peak traffic the latency would stay low.
- edmcnulty101 5y agoWhat router are you using or are you using a modem plugged into a Linux box ?
- throwjs51009 5y agoNot OP but check out IQrouter https://evenroute.com/iqrv3 https://evenroute.com/iqrv3
- invalidator 5y agoBack when I was hosting servers in my home, I used an old Linux box (maybe a K6?) with several NICs. It didn't take much to keep up with DSL. Since then, I've moved all my services to the cloud. My home router is a TP-Link Archer C7 v2, which I chose mainly because it was well-supported by OpenWRT. The last few years, I've been using routers from GL.iNet [1] when setting things up for friends and family. The factory firmware is OpenWRT, lightly modded with a simplified UI in front. The full OpenWRT Luci UI is still available behind an "Advanced" link. [1] https://www.gl-inet.com/ https://www.gl-inet.com/