CGI programs have an attractive one step deployment model
utcc.utoronto.ca
utcc.utoronto.ca
I was looking at one such system (a bash one) that’s approaching its 10th anniversary. It has outlasted so many systems it’s unbelievable
Do the minimum job you need, just well enough.
CGI can be simpler than FastCGI. Which can be simpler than some huge automatic deployment system atop CI and Docker and containerization and Kubernetes and someone else's server pool a thousand miles away.
When I implemented the SCGI protocol (which is similar to FastCGI) for Racket, I intentionally made it work as both SCGI and CGI. The application code is the same for both backends, and the `scgi` package auto-detects which it should use. https://docs.racket-lang.org/scgi/
Of course in production you'll probably add layers atop this, but you could usually drop down to just running the CGI script on your laptop in some ad hoc debugging setup.
In practice of course, Docker/containerization also has various issues, but that's just down to inherent complexity of the problem space. Thinking CGI solves all your problems is like thinking reverting to a caveman lifestyle solves all your modern first world problems.
The "works the same on your laptop" argument is important for some purposes (and that's one of the reasons I run Debian Stable on everything normally), but I think it gets misunderstood by many people who would have no idea how to run even a simple one-off application without big infrastructure.
I don't recall CGI being sensitive to web server, version, or configuration, in practice. CGI should interface the same today as 30 years ago.
That may be true in general but I don't think it's a universal truth - it's been well over a decade, but ISTR running PHP in Apache as FastCGI was a matter of a few directives in httpd.conf. No application servers, deployment model identical to that of plain CGI. Co I misremembering?
There were multiple exec's in a request chain which was pretty slow. Web servers started to consolidate both ends under a same process - whatever was executed via CGI could be compiled to a dynamic library for direct interfacing, and web server could implement its own connection handler with multiple concurrency strategies instead of a simplistic fork one done by inetd.
Sure you can find a single-copy-deployment solution with FCGI too like how PHP does it, but one has to feel a need first.
[1] https://boston.conman.org/ [2] https://github.com/spc476/mod_blog
Less documented/talked about are performance tracking and optimisation of code that gets running on it.