4 ms·
Using SCGI as the sole backend protocol is a bad idea. I have implemented a C++ SCGI stack myself. The problem with SCGI that I found (of course very late in th
by cleeus 10y ago
Using SCGI as the sole backend protocol is a bad idea. I have implemented a C++ SCGI stack myself. The problem with SCGI that I found (of course very late in the game) is that it requires a TCP connection on localhost for every request on the HTTP frontend. This will leave you with a TCP socket in TIME_WAIT state for every logical request. While it is very simple to implement, it's missing pipelining an keep-alive. I think it's a better idea to implement a very minimalistic HTTP backend that can do pipelining and keep-alive with the upstream HTTP server. You don't need to support the full HTTP protocol, just enough to function with nginx/lighttpd/Apache.
- rafaelmartins 10y agothanks for sharing your experience. I appreciate it
- bontoJR 10y agoTotally agree with that, I have implemented it as learning project FastCGI and SCGI in Swift few months ago and SCGI seems really weak for a real world project right now, even an easier one. I would also give an extra +1 in recommending to consider interfacing with nginx/lighttpd/Apache.