In my previous post Serving 200 million requests per day with a cgi-bin, I did some quick performance testing of CGI using a program written in Go. Go works excellently for CGI programs, for many of the same reasons it works so well for CLI programs and system daemons. But, out of curiosity, I decided to do a bit more CGI testing with other languages. CGI is good technology, actually# There’s a misconception that because CGI is old or because many CGI scripts had security vulnerabilities, CGI itself is somehow insecure or bad. That’s just not the case. CGI is a simple protocol that works very well. It’s not any more or less difficult to write secure CGI programs than it is to write any other kind of HTTP handler code. The common alternatives to CGI, FastCGI and reverse proxies, aren’t a free lunch and have their own security complications. The benchmarking server# This time I used an AMD Genoa-based 60 vCPU / 240 GB RAM virtual machine to serve as a reasonable medium-sized machine. Running benchmarks in VMs isn’t ideal because of noisy neighbor problems and other sources of variable performance. However, when doing macrobenchmarking, it’s less of a concern and the results are fairly consistent. This is even more true when using a larger VM, where there are fewer neighbors on the host. Still, I do always prefer bare metal, but sometimes you leave your servers behind for other people to enjoy. I miss “my” beautiful servers but they’re in good hands and at least I can still post to them and visualize the disk and network IO and CPU usage, which isn’t creepy to do, it’s actually perfectly normal. I do not miss Nandos in DC and their unrefrigerated sauces![image or embed]— Jake Gold (@jacob.gold) November 12, 2024 at 8:11 PM Standard benchmarking disclaimer# Benchmarking of any kind is fraught, and it’s easy to make mistakes, which is why there’s no substitute for real-world testing in your own environment. The CGI programs written in each language are broadly similar bu...
First seen: 2025-07-09 13:34
Last seen: 2025-07-09 15:35