News for hackers. Stuff that matters.
Re:Show HN: My website, hosted on a 386 25 MHz, 4 MiB of RAM... by AviationAtom on Saturday April 16, 2022 @04:01PM (#31055616)
Oh, no doubt, but I hold out hope that somehow, some way, somebody will find a way to handle the hug of death. Perhaps it's simply impractical on such modest hardware.
Re:Show HN: My website, hosted on a 386 25 MHz, 4 MiB of RAM... by serentty on Saturday April 16, 2022 @04:03PM (#31055633)
I think it would have fared much better if I had waited until I got my ISA Ethernet card in the mail. But serving this over serial at 38400 baud and watching it try to keep up was tempting. I’ll have to see how well it fares with real networking hardware. At that point I might post it again, although I will have to add enough content to it to justify a repost.
Re:Show HN: My website, hosted on a 386 25 MHz, 4 MiB of RAM... by CyberRabbi on Saturday April 16, 2022 @04:08PM (#31055669)
Are you able to measure the latency of processing one request when there is no load?

Just back of the envelope, if it takes 200,000 instructions to handle a request and we assume 6 cycles per instruction, then that’s about 25 requests per second.

HN is roughly 50K requests over 6 hours, so that’s roughly 2 requests per second on average. I would imagine it peaks to about 25. So in theory you should be able to handle the traffic.

Re:Show HN: My website, hosted on a 386 25 MHz, 4 MiB of RAM... by admax88qqq on Saturday April 16, 2022 @04:20PM (#31055758)
The 38400 baud might be the biggest bottleneck.

http://bettermotherfuckingwebsite.com/ is 20k, ignoring http overhead.

Maybe strip that to 15k after compression, and cut some content.

Still 15000/38400 <= 3 responses per second.

Add in serial parity overhead, http overhead. Might be able to sustain 2 rps with enough cleverness.

Leaves no room for bursts

Re:Show HN: My website, hosted on a 386 25 MHz, 4 MiB of RAM... by fisherjeff on Saturday April 16, 2022 @04:32PM (#31055851)
Don’t forget that 38400 baud serial is 3840 bytes/s…
Re:Show HN: My website, hosted on a 386 25 MHz, 4 MiB of RAM... by arcticbull on Saturday April 16, 2022 @05:41PM (#31056336)
38400 baud should be 38.4kbits/sec or 4800 bytes/sec no?

[edit] never mind, you're right, assuming an 8N1 configuration - 8 bit bytes, 1 start bit, 1 stop bit, and no parity bits.

Re:Show HN: My website, hosted on a 386 25 MHz, 4 MiB of RAM... by admax88qqq on Saturday April 16, 2022 @06:59PM (#31056867)
Yup definitely forgot bits vs bytes lol.

So 3kB/s, if your site is 15kB you're looking at 5 seconds per request, or 0.2 rps.

Plus overhead. I thought my original math sounded too fast.

Re:Show HN: My website, hosted on a 386 25 MHz, 4 MiB of RAM... by Moru on Saturday April 16, 2022 @09:39PM (#31057673)
A nitpick though from someone that actually used a 300 baud modem without dialing function, baud != bps [0]

[0] https://www.linuxjournal.com/files/linuxjournal.com/linuxjou...

Re:Show HN: My website, hosted on a 386 25 MHz, 4 MiB of RAM... by djbusby on Saturday April 16, 2022 @04:57PM (#31056028)
The content can be performance metrics before and after the Ethernet card.
Re:Show HN: My website, hosted on a 386 25 MHz, 4 MiB of RAM... by tyingq on Saturday April 16, 2022 @04:14PM (#31055714)
>Perhaps it's simply impractical on such modest hardware

I imagine it's not just the hardware limitations, but the available software. This one, for example being MS/DOS, where there were never really any serious server-side http/tcp implementations.

On the other hand, there were very busy BBS systems running on DOS where there had been time for years of various optimizations to happen.

Re:Show HN: My website, hosted on a 386 25 MHz, 4 MiB of RAM... by outside1234 on Saturday April 16, 2022 @04:21PM (#31055760)
It is probably the modem honestly. The 386 is well capable of saturating a 38.4k modem many times over.