|
|
|
|
|
by preseinger
1341 days ago
|
|
Speed is the only reason CGI doesn't fly. What do you think is the upper limit of requests per second, if your HTTP server does process-per-request? For simplicity, assume server class hardware, that each request does no work besides producing a response, and an upper bound of 10k unique remote addresses (i.e. no more than 10k concurrent connections in a different model). How do you think those metrics compare to other designs? I have an affinity for the conceptual simplicity of CGI but I've never been able to get a process-per-request server within even an order of magnitude of the performance of the more common designs. But I could be missing something! Also, how does this design adapt to HTTP/2? |
|
In the hundreds, which is absolutely enough for most use cases. If CGI is enough for sqlite.org displaying dynamic content (such as in https://www.sqlite.org/cgi/src/timeline), it is enough for 80% of websites. You are not bigger than sqlite.
> How do you think those metrics compare to other designs
The important question is not "is it better or worse than alternatives" but "is it enough for me". Yes, it is.
> Also, how does this design adapt to HTTP/2?
HTTP/2 doesn't change anything. Requests are on the same socket until the webserver, and the webserver forks a process for each request, multiplexes the responses and all is well.