5 ms·
Ask HN: How “minimal” can a server go?
My question here is intentionally broad and imprecise to invite discussion.
I currently have a virtual host running email, web and a few other servers for my personal use. At the moment, I'm in the process of migrating to local hosting an a Rasberry Pi Zero.
This got me thinking, what is the absolute minimum hardware I could run things on? Could I easily solder together some PCB and run a file server on "bare metal"? How about SMTP?
There are many interpretations of these questions, but I'd like to hear what kinds of "minimal" server hardware and software people are running for various meanings of "minimal".
The long term goal I have in mind is to build some server-like box of which I understand all the abstraction layers from the physics up.
- detaro 9y agoPeople have put ethernet stacks on 8bit microcontrollers or retro PCs, and those can serve simple websites, and probably also could handle e-mail. Pretty sure one of the projects making a CPU from TTL logic ICs also runs a server on there (although with the network connection over a serial link) Everything that requires TLS is going to give you trouble though on really small platforms, but offloading that might be an interesting challenge.
- Piskvorrr 9y agoA virtual host usually has a fullweight Linux kernel - that's a lot of bloat that sits unused; a RPi is actually a fairly powerful computer, with all sorts of complicated, fancy extras (USB? Bluetooth? GPIO ports?) This is a start, but it's still far from minimal: https://github.com/ovidiucp/TinyWebServer https://github.com/ovidiucp/TinyWebServer - after all, even an Arduino is a general-purpose computer based on a chip called ATmega328P; note the mega- infix. This is a much tinier controller from the same manufacturer - only about 10x more powerful than the computers that put men on the Moon. That's fairly minimal by today's standards...but it's still possible to go deeper: https://hackaday.com/2014/08/29/bit-banging-ethernet-on-an-attiny85/ https://hackaday.com/2014/08/29/bit-banging-ethernet-on-an-a... (edit: I overestimated the AGC by an order of magnitude)
- stevekemp 9y agoLast December I started getting interested in "hardware stuff", and so I bought myself an Arduino, and started experimenting with it. Very quickly I moved over to using the ESP8266 chip, which is typically packaged in a small board with a bunch of breakout pins, just like the Arduino. The advantage of the ESP8266 chip, and the various packaged versions of it, is that it can be programmed via the same Arduino IDE, but it has on-board wifi-support. The board that I'm mostly using these days has 4Mb flash, and can easily be used to serve static & dynamic content from that space. The board I use is approximately 3cm x 4cm: https://wiki.wemos.cc/products:d1:d1_mini https://wiki.wemos.cc/products:d1:d1_mini That's not the smallest, and it wouldn't cope with SMTP-handling, but sending simple/static HTML/CSS/JS and processing HTTP POST submissions is entirely within its capabilities - and it'll only cost you €3 or so.
- chris__butters 9y agoHosting emails on it won't work well unless you can guarantee a static IP address as the emails would get flagged as spam/junk instantly.