3 ms·
The non-static portions of the Tarsnap website still consists of CGI scripts written in C. Sure, forking a process per request isn't fast... but I'd love to ha
by cperciva 6y ago
The non-static portions of the Tarsnap website still consists of CGI scripts written in C.
Sure, forking a process per request isn't fast... but I'd love to have enough traffic for that to matter.
- midasuni 6y agoThere seems to be a general view that anything you write today has to scale to a million concurrent users. There’s literally 20 people that have client certificates that can access my page. I don’t care if they fork a process each.
- zokier 6y agoWell, AWS kinda has made it so that almost every millisecond of CPU time (or other resources) is considered billable. While in the olden days you could run some scripts in some unused corner of a server for "free", with clouds that is less likely.
- wahern 6y agoServices like Lambda are basically single process per request. They just pre-fork instances under load, similar to Apache. Because of the not insignificant instrumentation and other overhead in cloud architectures (e.g. Lambda uses VMs for isolation, Cloudflare uses WASM), a small, natively compiled CGI app probably uses less CPU and I/O than these modern solutions as starting a new process in Linux from an already cached copy of the executable doesn't really have much overhead in comparison to the layers of software involved in some of the aforementioned options, despite their other optimizations.
- midasuni 6y agoA lightsail server can cope with 500 or so people that need to use my server every day for $10 a month. It’s not worth thinking about the price, just throw the script up and job done. Even if you could spend a couple of hours making it twice as performant it wouldn’t matter.