Find Related products on Amazon

Shop on Amazon

Remember FastCGI? (2021)

Published on: 2025-04-30 04:00:51

“Serverless” is sometimes referred to as “cgi-bin” which isn’t entirely fair as it’s somewhere between cgi-bin and FastCGI. Somewhere along the way both faded from memory. While goofing off last weekend wondered to myself: is FastCGI still useful? Unlike the classic cgi-bin approach where a script or program was executed for each individual request, FastCGI is a binary protocol which allows for longer lived processes serving multiple requests. It continues to be used in the PHP community but seems to have largely fallen out of favor. Nonetheless I decided to tinker a little bit with FastCGI in Rust. The most sensible crate that I found was the fastcgi and played around a bit. The crate is a bit old and I needed to do some fiddling to get a simple example compiling: extern crate fastcgi ; use std :: io :: Write ; use std :: net :: TcpListener ; use log :: * ; fn main () -> std :: io :: Result < () > { pretty_env_logger :: init (); let listener = TcpListener :: bind ( "127.0.0.1:8010" ... Read full article.