4/29/2026 at 6:44:33 PM
I agree with the article, FastCGI is better than HTTP for these things.Though I'd like to make another protocol known: Web Application Socket (WAS). I designed it 16 years ago at my dayjob because I thought FastCGI still wasn't good enough.
Instead of packing bulk data inside frames on the main socket, WAS has a control socket plus two pipes (raw request+response body). Both the WAS application and the web server can use splice() to operate on a pipe, for example. No framing needed. Also, requests are cancellable and the three file descriptors can always be recovered.
Over the years, we used WAS for many of our internal applications, and for our web hosting environment, I even wrote a PHP SAPI for WAS. Quite a large number of web sites operate with WAS internally.
It's all open source:
- library: https://github.com/CM4all/libwas - documentation: https://libwas.readthedocs.io/en/latest/ - non-blocking library: https://github.com/CM4all/libcommon/tree/master/src/was/asyn... - our web server: https://github.com/CM4all/beng-proxy - WebDAV: https://github.com/CM4all/davos - PHP fork with WAS SAPI: https://github.com/CM4all/php-src
by max_k
4/30/2026 at 12:08:24 AM
>>FastCGI is better than HTTP for these things.FastCGI and HTTP are at two different levels. HTTP is for data transfer from, say, a browser and a server. FastCGI is for handling that data between the server and an application.
Just now I glanced at the article and it seems the author writes in a confusing way to imply that HTTP and FastCGI are interchangeable and they are not.
fwiw, I used fcgi for a decade for all our web customers.
by assimpleaspossi
4/30/2026 at 1:00:56 AM
>> FastCGI is better than HTTP for these things.> FastCGI and HTTP are at two different levels. HTTP is for data transfer from, say, a browser and a server. FastCGI is for handling that data between the server and an application. Just now I glanced at the article and it seems the author writes in a confusing way to imply that HTTP and FastCGI are interchangeable and they are not.
That might be just you. The article is littered with the qualifier "for reverse proxies", including in the title and two section headers, and "as the protocol between reverse proxies and backends" in the second paragraph. I don't know how it could be any more clear on this point.
The max_k comment you've quoted includes "for these things"; context clues suggest by "these things" he also means to limit his comment to the reverse proxy <-> backend leg.
by scottlamb
4/30/2026 at 10:56:02 AM
I didn't quote anything from the article. I was responding to the comment, not the article.by assimpleaspossi
4/30/2026 at 11:16:40 AM
The comment was made in response to the article. This whole discussion is in the context of the article. You choosing to ignore that doesn't mean everyone else has to let you.by sjsdaiuasgdia
4/30/2026 at 2:38:34 PM
And I was saying his comment is wrong. Sometimes HN can be just so reddit-like.by assimpleaspossi
4/30/2026 at 2:41:37 PM
His comment is _not_ wrong. He says "I agree with the article, FastCGI is better than HTTP for these things.""These things" being the communication between a proxy and the backend.
by justusthane
4/30/2026 at 9:36:51 PM
Thanks, but I feel we're all just feeding this one troll. Don't bother replying anymore, it's pointless.by max_k
4/30/2026 at 4:00:59 PM
> I didn't quote anything from the article.You referred to it: "just now I glanced at the article and it seems the author writes in a confusing way..."
> I was responding to the comment, not the article.
It sure looks like you were responding to both, and I addressed both. Also, you're going to have a hard time understanding HN comments if you don't read top-level comments as responses to the article, even if they don't start with "I agree with the article" as max_k's comment did.
by scottlamb
4/30/2026 at 12:46:26 AM
> FastCGI and HTTP are at two different levels. HTTP is for data transfer from, say, a browser and a server. FastCGI is for handling that data between the server and an application.Not entirely correct. A reverse proxy can either speak HTTP, or a different protocol such as FastCGI with the application server. The article is talking about that communication.
They are not interchangeable for the browser-to-server communication, but they are for the server-to-application piece.
by selcuka
4/30/2026 at 1:08:26 AM
Your last sentence is exactly what I said.by assimpleaspossi
4/30/2026 at 2:07:39 AM
You didn't though. You may have intended to?The article points out that HTTP and FastCGI are both options for reverse proxies to communicate to the downstream server. I didn't find a reference to them being interchangeable outside of that context. If there is or was one please quote it.
by opello
4/30/2026 at 10:54:30 AM
I was responding to the comment, not the article.by assimpleaspossi
4/30/2026 at 2:45:22 PM
> I agree with the article, FastCGI is better than HTTP for these things.If this is what you mean to identify as claiming FastCGI and HTTP are generally interchangeable, and are rising to correct, I'll also offer that "agree with the article" and "these things" narrow the context to "for reverse proxy communication" and do not suggest the broader meaning you've interpreted.
by opello
4/30/2026 at 2:03:43 AM
The article is really exclusively about the reverse proxy server to server use case, not client to server. The title even says it.by anon7000
4/30/2026 at 10:54:50 AM
I responded to the comment, not the article.by assimpleaspossi
4/30/2026 at 6:08:02 AM
> imply that HTTP and FastCGI are interchangeable and they are not.But they are interchangeable!
FastCGI and HTTP/1.1 are indeed on the same level. Both are transport protocols for HTTP requests.
It would be technically possible to implement FastCGI as alternate transport protocols in browsers and web servers, just like HTTP/2 (SPDY) and HTTP/3 (QUIC) are alternate transport protocols for HTTP requests.
(This is not what the article and my comment are about, as others already pointed out.)
by max_k
4/30/2026 at 12:21:21 AM
I feel like the author of an alternative protocol probably knows these things.I think the author mentions HTTP because many people use it where they could be using FastCGI and just don’t.
by afavour
4/30/2026 at 1:08:54 AM
Please note that it's called FastCGI, not FastHTTP.by assimpleaspossi
4/30/2026 at 5:48:16 PM
Again, you’re pointing out things that are obvious to those involved and I’m not sure why.by afavour
4/30/2026 at 8:28:18 PM
Because, besides you, the rest of HN is oblivious to the obvious judging by the downvotes.by assimpleaspossi
4/30/2026 at 12:38:53 AM
And yet I’ve seen in production the (ab)use of HTTP where fcgi would’ve been a much better fit.by girvo