Hacker News new | ask | show | jobs
by neilv 2602 days ago
These are great links. Router in Go is impressive (and making me wonder whether one could do the same in Racket/Scheme, and work around GC). I like to see parties acquiring/regaining the ability to make their own hardware. The PC Engines apu2 looks tempting, and a couple more NICs would be even better, for an all-in-one device supporting more LANs (that are a bit more compartmentalized), and avoiding the need for separate Ethernet switches/hubs in some cases.
3 comments

Currently I went for an Ubiquity route: ER-L, UAP AC Pro, and an ES‑16‑150W. Together it cost over 500 EUR. Add to it a Synology NAS with 16 GB RAM and 2x 6 TB HDD and it all cost ~1500 EUR.

I'd want the Unifi AP AC Pro either way though because the location of my router/switch isn't appropriate for WLAN AP, and I want the flexibility. My ER-L runs WireGuard, Pi-Hole (for adblocking), and Unbound (for DNSSEC). This allows my roaming devices (which roam over e.g. LTE or corporate/public WLAN) to utilize the mentioned services. The Synology NAS runs Docker, e.g. UNMS/Unifi Controller, but also things such as Nextcloud.

As long as I keep hardware offloading enabled (which does not work with certain software) the throughput of all of the above hardware saturates the specifications. I'm happy with the hardware, but I bought it all before I knew about R7.

Turris MOX software is based on OpenWrt btw. You could add 2x the 8 port module for a total of 17 ethernet ports (A+E+E) [1].

[1] https://mox-configurator.turris.cz/

Are there any disadvantages to just using a SBC (pi, rock64 or whatever) that has a wifi chip and a LAN port, connected to a basic switch? I mean, besides having a slightly bigger box.
Well... if you want to route more then say 50-100 megabits... then the pi won't suffice.

OpenWRT on many simple platforms will do a couple of hundred megabits, and on something like the edgerouter-x or routerboard 750gv3 will do about 800-900 megabits.

I like the Pi, but am leaning away from it for routers. I haven't tried it for a router, so the following is just my initial impression, take with a grain of salt...

The Pi is around a closed hardware SoC, you can't pick&choose devices (like people often do when they can), devices are limited (e.g., 1 Ethernet), RAM is limited, devices might be on funny buses internally (e.g., on internal USB), microSD cards are not very reliable.

I don't know whether there's as solid a router software setup for the Pi as OpenWrt on a well-supported SOHO router.

I don't know how well the built-in WiFi in the Pi 3 can be made to work as an AP, and I think it's only one radio. Picking&choosing a WiFi device(s) that you plug in via USB gives you more options. You might need a powered USB hub, depending on how much total draw you've got on USB, and whether you've hacked your Pi board for USB power limit.

There used to be another consideration with the Pi, which is that I'd end up having to plug a bunch of things into it, including a powered USB hub, somewhat fragile, and I ended up putting everything into an electronics project box, and running just a power cable on a strain relief out. You also used to have to consult a list of known-good wallwarts and microSD cards, to reduce risk of flakiness, but I think that's improved. By comparison, a WNDR3700v2 with OpenWrt was an off-the-shelf appliance box, and could do more than the Pi, router-wise.

There are SBCs with better specs for routing. Where the SBC (and SoC) is designed could be a factor. Separate from SBCs, of course there's amd64 PC hardware on a Mini-ITX or MicroATX board, with PCIe slots for your choice of NICs, and gigabytes of RAM (though AES-NI is in the minority of fanless-capable options I've found). All these boards are effectively unauditable, of course.

(I'm not criticizing the Pi in general. I've used older Pis successfully, and currently use a Pi 3B+ with a 64-bit kernel as a builder&programmer&powersupply for PostmarketOS devices. I'm also thinking of putting a Pi into/onto the chassis of my laser printer, to provide a CUPS IPPS server that prints to USB, rather than try to keep firewalled in the router all the things this printer seems to want to do if you give it network access.)

If I wanted to go the SBC route, what specs would I want to pay attention to? There are many boards that are (or seem to be) well supported in mainline kernel, but I have no idea how to tell whether the wifi is well suited to this use case or the internal connection stuff... Throughput benchmarks are also few and far between.
IIRC the Pi uses an Ethernet adapter connected through USB, that’s a sure sign of a platform not suited to being a router
Friendly PSA that modern Go has GC pauses under 1ms in almost all cases. That may still be a problem for your application, but it is a far cry from what people expect from other GC languages like Java.