Remember FastCGI? (2021)
a year ago
- #Serverless
- #FastCGI
- #Rust
- Serverless is compared to cgi-bin and FastCGI, though not entirely accurate.
- FastCGI allows longer-lived processes serving multiple requests, unlike cgi-bin which executes per request.
- FastCGI is still used in the PHP community but has largely fallen out of favor.
- The author experimented with FastCGI in Rust using the 'fastcgi' crate, requiring some adjustments.
- A simple FastCGI server was set up and tested with nginx in Docker.
- The author questioned the advantage of FastCGI over embedded web servers like Tide.
- A comparison between FastCGI and Tide (HTTP server) showed Tide's simplicity and direct testing capability.
- FastCGI may still be useful for scripted languages with slow/unsafe HTTP processing, but HTTP servers are generally preferred.