Live data from Hacker News

Serving a website on a Raspberry Pi Zero running in RAM

btxx.org

31–40 of 107 posts

Re: Serving a website on a Raspberry Pi Zero running in RAM

#31
post #28

Earlier quoted context omitted.

>This machine is 10x what we were running web servers on in the '90s. Kind of irrelevant since operating systems and web pages in the 90's were significantly smaller in footprints, as the web was mostly plain text back then. Windows XP with its GUI would run Max Payne on 128MB of RAM. You could do a lot more back then that You can't do modern stuff like that today with 128MB of RAM.

The contents of webpages are largely the same. HTML code, CSS, Javascript, Images. In this case, they are static elements, which can even be cached locally to share more easily. If someone wants a massive build system to render a static HTML page, that's on them, and their personal interpretation. Increasingly, and maybe more often than not, there is more than one way to get the same outcome. The fact that there's hu…

Even then... it's usually built before it's deployed n the server.. the server is still delivering text, css, js, images and images have always been pretty large. So your connection is tied up for a little bit longer... and as content was smaller in the 90's, connections themselves are much faster today... in the 90's you were lucky to be hosting on a T1 or faster and clients on modems. Today, you've likely got between 100mb to 2gb uplink on your home connections, let alone business connections that generally start at 1gb. 600x the bandwidth for the server from a T1

Re: Serving a website on a Raspberry Pi Zero running in RAM

#32
post #5
post #2

A raspberry zero is more powerful than an enterprise server from the 1990s. A minimalist static website is not impressive. You can fit way more in there.

I hosted my personal email domain on a Zero for almost 10 years. It had about the same capability as the very expensive (and large) Win NT4 machine we used for our 80-person organization when I started my career in tech. I eventually replaced the Zero with a Raspberry Pi 4, primarily because the Zero’s IO ports are annoying (eg, USB is not hot-pluggable!) An RPi 4 is extreme overkill for personal email but it still i…

>The point of failure for all of these machines has been the SD card. They seem to last 4 years almost to the day. I suppose if I set up a RAMdisk they might last longer, but honestly, for the price of an SD card it’s not really worth my time.

There are "Industrial" SD cards which should last considerably longer, you can look up a few people have done their own testing. They can be slower but that shouldn't be a blocker for an email server on a pi.

Re: Serving a website on a Raspberry Pi Zero running in RAM

#34
post #5
post #2

A raspberry zero is more powerful than an enterprise server from the 1990s. A minimalist static website is not impressive. You can fit way more in there.

I hosted my personal email domain on a Zero for almost 10 years. It had about the same capability as the very expensive (and large) Win NT4 machine we used for our 80-person organization when I started my career in tech. I eventually replaced the Zero with a Raspberry Pi 4, primarily because the Zero’s IO ports are annoying (eg, USB is not hot-pluggable!) An RPi 4 is extreme overkill for personal email but it still i…

They make high endurance microSD cards that can handle a lot more writes before failing.

OTOH, I corrupted a card by turning off the Pi in middle of writing.

Re: Serving a website on a Raspberry Pi Zero running in RAM

#35
post #5
post #2

A raspberry zero is more powerful than an enterprise server from the 1990s. A minimalist static website is not impressive. You can fit way more in there.

I hosted my personal email domain on a Zero for almost 10 years. It had about the same capability as the very expensive (and large) Win NT4 machine we used for our 80-person organization when I started my career in tech. I eventually replaced the Zero with a Raspberry Pi 4, primarily because the Zero’s IO ports are annoying (eg, USB is not hot-pluggable!) An RPi 4 is extreme overkill for personal email but it still i…

I remember in the mid-late 90's how poorly the Exchange server ran that there was a nix server for inbound email just to throttle the ingress. When it was upgraded to a 4-socket server, there was concern when the *nix guys just let everything that was being held during the upgrade through, and it just chugged along. But the moment of panic was palpable. The Unix guys really didn't like that business internals and apps were running from Windows services, so thought it would be funny to try to knock over the new mail server.

Today, you can run mailcow/mailu with all the options on a relatively modest vps. I'm on a cable provider that locks down residential customers and charges over 2x as much for business, so it's cheaper to use VPSes.

On RPi, I've mostly opted to use SSD + USB Adapters as they've been significantly more reliable that SD. There's lots of cases that make this configuration a breeze. That said, I've mostly been running Mini PCs since COVID when the RPi got to be more expensive all-in and slower.

Re: Serving a website on a Raspberry Pi Zero running in RAM

#36

After seeing what new R-Pi stuff is selling for I went rummaging in the parts drawer and found the following: - R-Pi Zero W - Sixfab UPS hat - Sixfab Cellular IoT App Shield - R-Pi model 1B With all this I should be able to make a multiply redundant always-on bastion host. It's awesome that alpine supports the armhf stuff, many OSes have dropped 32bit support entirely.

I assembled a solar server with those parts laying around last year:

- Victron Monocrystalline Panel 90W 12V

- Victron Gel Battery 12V 60Ah

- Victron MPPT Charge Controller 75V 15A

- Raspberry Pi Zero W

- Witty Pi 5

- Sixfab 4G/LTE Base HAT

- Quectel EC25 Mini PCle 4G/LTE Module

Almost 100% uptime except for a few days after a bad winter storm, pretty neat!

Re: Serving a website on a Raspberry Pi Zero running in RAM

#37

I have a self hosting Pi Zero W running Gentoo. It started as a joke, but I kept it because it's actually occasionally useful for testing new kernel releases. I found a fun bug with it a couple years ago: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin... It is still able to build software faster than it is released. It takes roughly a month to recompile the entire system :D

I self host some CI runners and do kernel work on a Pi writing some software defined radio things.

For the radio stuff I can just take the Pi, frontend, and a battery pack outside to test.

When I finally move to a place with proper fiber internet I'm going to be hosting several side projects on a handful of Pis.

Re: Serving a website on a Raspberry Pi Zero running in RAM

#38
post #2

A raspberry zero is more powerful than an enterprise server from the 1990s. A minimalist static website is not impressive. You can fit way more in there.

Indeed, you can even permanently run one using a balcony solar panel:

https://solar.lowtechmagazine.com/about/the-solar-website/

Re: Serving a website on a Raspberry Pi Zero running in RAM

#39
post #25

Earlier quoted context omitted.

>This machine is 10x what we were running web servers on in the '90s. Kind of irrelevant since operating systems and web pages in the 90's were significantly smaller in footprints, as the web was mostly plain text back then. Windows XP with its GUI would run Max Payne on 128MB of RAM. You could do a lot more back then that You can't do modern stuff like that today with 128MB of RAM.

You can host such sites perfectly well nowadays. I’ve often served hand-written HTML pages of only few lines

LLMs, including open ones, are really good at this it turns out. It stands to reason, there is tons of training material out there no doubt they have consumed and are ready to regurgitate.

Yesterday I one-shotted several interactive pages, that Qwen built out of straight HTML and Javascript. I handed it my API (source code, not even a swagger, via an MCP that Qwen wrote for me), asked for a frontend, and it delivered. One page at a time to keep context down, and mightve gotten lucky on the first draw but after the first one I told it to make the next ones like the first.

Can't say I've had that experience with backend languages & frameworks, incl writing that same API, but perhaps I'm off the beaten path with those, or perhaps there's greater breadth of things to do vs a narrower set of acceptance criteria? IDK.

Here I was sweating that I'd have to research and learn a current-day frontend framework. It felt like a magic wand using consumer-grade AI. HTML and plain old Javascript was plenty.

Tangent but apropos of other contemporary threads on HN, it puts a spin on supply chain threats. There's no NPM or anything, except perhaps whatever mysteries are baked into the model.

Post reply on HN