by yuliyp · 1y ago · 0 comments
CGI is also serverless
I wrote a couple articles with these comparisons, and related issues:
Comments on Scripting, CGI, and FastCGI https://www.oilshell.org/blog/2024/06/cgi.html
Comments on Shared Unix Hosting vs. the Cloud https://oils.pub/blog/2025/02/shared-hosting.html
---
I'm not the only one who thinks this: https://www.devever.net/~hl/mildlydynamic
AWS Lambda: CGI But It's Trendy. Recently we've seen the rise in popularity of AWS Lambda, a “functions as a service” provider. From my perspective this is literally a reinvention of CGI, except a) much more complicated for essentially the same functionality, b) with vendor lock-in, c) with a much more complex and bespoke deployment process which requires the use of special tools.
People who don't think this is true probably never used PHP or CGI ... You don't manage the server; you just upload your code!
Architecturally, it is the same. From the user experience, it is the same.
PHP and CGI also scale infinitely, because they are stateless. Meta scales PHP to a user base of half the world's population. They could also scale CGI/FastCGI.
The flexibility of knowing that any machine can instantly run the code for your API gives a lot of flexibility to rapidly scale up an API.
Nothing is “serverless” to everyone. Especially when you run the data center. But being “serverless” and even sitting above the “language runtime” gives API developers a lot of freedom to focus on business logic.
By that definition, you could argue Amazon's detail page is "serverless".
Lots of companies are hosting old monoliths on Amazon Fargate, for example.