News for hackers. Stuff that matters.
Re:Surviving the front page of Hacker News on a 50 Mbps uplink by invalidator on Wednesday February 09, 2022 @02:25AM (#30269933)
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

Re:Surviving the front page of Hacker News on a 50 Mbps uplink by zekica on Wednesday February 09, 2022 @04:28AM (#30270721)
Codel, Fq_Codel and especially Cake are worth looking into.
Re:Surviving the front page of Hacker News on a 50 Mbps uplink by mrg2k8 on Wednesday February 09, 2022 @02:35PM (#30277324)
I 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.
Re:Surviving the front page of Hacker News on a 50 Mbps uplink by throwaway48375 on Wednesday February 09, 2022 @06:31AM (#30271471)
I wish OPNsense had cake.
Re:Surviving the front page of Hacker News on a 50 Mbps uplink by edmcnulty101 on Wednesday February 09, 2022 @12:07PM (#30275060)
What router are you using or are you using a modem plugged into a Linux box ?
Re:Surviving the front page of Hacker News on a 50 Mbps uplink by invalidator on Wednesday February 09, 2022 @05:21PM (#30279365)
Back 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/

Re:Surviving the front page of Hacker News on a 50 Mbps uplink by throwjs51009 on Wednesday February 09, 2022 @02:16PM (#30277074)
Not OP but check out IQrouter

https://evenroute.com/iqrv3