Serving 200 million requests per day with a cgi-bin
In the early 2000s, we used to write a lot of CGI programs.
This was the primary way to make websites dynamic at the time. These CGI programs were usually written in Perl, but sometimes in C to increase performance.
The CGI mechanism is conceptually simple but powerful. When the web server receives an incoming request handled by a CGI script (e.g. GET /~jakegold/cgi-bin/guestbook.cgi), it:
Sets up environment variables containing request metadata (HTTP headers, query parameters, request method, etc.)
Spawns a new process to execute the CGI program
Passes the request body (if any) to the program via stdin
Captures the program’s stdout as the HTTP response
Sends any error output from stderr to the error log
The CGI program reads the environment variables to understand the request, processes it, and writes an HTTP response to stdout, starting with headers.
Advanced cloud services are based on good hardware, decent software, and surrounding infrastructure that combines these both into solid solutions that can be provided as a business activity.
Europe is good with operating the hardware. And surprisingly, we are also good with writing software. Much of the software used by the main cloud providers is based on open source, and lots of that open source is authored by European programmers. What we sorely lack here are providers of higher level cloud services, the kind that businesses clamor for.
This was originally titled “I miss when computers were fun”. But in the course of writing it, I discovered that there is a reason computers became less fun, a dark thread woven through a number of events in recent history. Let me back up a bit.
Many weird and wonderful new gadgets, gizmos and inventions were revealed in 2005. Autonomous cars, robotic assistants and nano-circuitry provided a bright view of the future, while cellphone viruses, virtual crime sprees and "non-lethal" crowd control weapons hinted at technological troubles ahead. The busiest inventor of the year was almost certainly Google, which continues to …
Pictures From Paper Reflections And A Single Pixel
Taking a picture with a single photoresistor is a brain-breaking idea. But go deeper and imagine taking that same picture with the same photoresistor, but without even facing the object. [Jon Bumst…
People have been talking about switching from Windows to Linux since the 1990s, but in the world of open-source operating systems, there is much more variety than just the hundreds of flavors of Li…
These days ‘AI’ is everywhere, including in software development. Coming hot on the heels of approaches like eXtreme Programming and Pair Programming, there’s now a new kind of pa…
In the past few years, what marketers and venture capital firms term “artificial intelligence” but is more often an advanced predictive text model of some sort has started taking people…
Your All-in-One Learning Portal: GeeksforGeeks is a comprehensive educational platform that empowers learners across domains-spanning computer science and programming, school education, upskilling, commerce, software tools, competitive exams, and more.
In this episode of The New Stack Agents, Shortwave's Andrew Lee discusses his Gmail-centric email client that puts AI at the forefront of the user experience.
Cory Doctorow Reveals How He'd Fix Big Tech's Domination
At PyCon US 2025, Cory Doctorow defined his term "enshittification," explaining how digital platforms degrade by first attracting users, then exploiting them for business customers, and finally exploiting both for the company's own profit.
Why The Latest Linux Kernel Won’t Run On Your 486 And 586 Anymore
Some time ago, Linus Torvalds made a throwaway comment that sent ripples through the Linux world. Was it perhaps time to abandon support for the now-ancient Intel 486? Developers had already abando…
As it stands, cryptocurrency largely seems to be a fad of the previous decade, at least as far as technology goes. During that time, many PC users couldn’t get reasonably priced graphics card…