Skip to content

Instantly share code, notes, and snippets.

@melo
Forked from miyagawa/gist:993824
Created May 27, 2011 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melo/994917 to your computer and use it in GitHub Desktop.
Save melo/994917 to your computer and use it in GitHub Desktop.
HTTP (Starman) vs FastCGI (fastpass)
HTTP
Pros:
HTTP, easy for humans to debug
Also works directly behind load-balancers (without frontends)
Many PSGI server implementations, preforking Starman, Starlet and non-blocking Twiggy
Cons:
Need to configure X-Forwarded-* headers both on fronend and backend
Keep-alive can be problematic
FastCGI:
Pros:
Potentially faster protocol because of binary
Sysadmin friendly (errors usually go to the web server's logs)
Cons:
No major server supports persisten FastCGI connections
Needs some tweaks to pass SCRIPT_NAME etc. correctly in nginx/lighttpd
Many broken web server implementations such as mod_fcgid or earlier version of lighttpd
FCGI.pm requires C/XS, FCGI::ProcManager options are confusing (hence fastpass and Net::FastCGI)
Less backend implementations, especially the one with proper preforking and non-blocking options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment