3 ms·
> Yes, your CGI may slow down if you're getting a hundred hits a second. How likely is that to happen, and if it does, how critical is the slowdown? It's sligh
by Retr0id 3y ago
> Yes, your CGI may slow down if you're getting a hundred hits a second. How likely is that to happen, and if it does, how critical is the slowdown?
It's slightly ironic to be reading this phrase via the front page of HN.
- rootusrootus 3y agoIt's a good point, though, for the many developers who are writing software for a limited audience, such as internal tools. Can't be reached by HN, can't be hugged to death.
- j45 3y agoSpeed of iteration is most important for most development in the beginning.
- mrweasel 3y agoThe site is running as a cgi script, according to the article, and hitting the HN front page doesn't seem to have slowed it down in any way that I've noticed. So I think the point is well made.
- Retr0id 3y agoThe page was served to me with `Last-Modified: Thu, 28 Dec 2023 04:02:49 GMT`, which to me implies either aggressive caching, or that the publishing system acts like a static site generator.
- siebenmann 3y agoThe publishing system takes some pains to provide an accurate last-modified value for HTTP caching purposes (and an ETag too); internally it tracks the most recent modification time of all components that go into the page as it's (dynamically) assembled from various pieces. (I am the author of the linked-to article and also the author of the software it's running. Said software also has (on-disk) caching, but that's not why the last-modified is back in December of last year.)
- deleted 3y ago[deleted]
- benhoyt 3y agoActually, an article of mine was on the front page of HN the other day, and it only got ~10,000 hits over a day. At its peak it was less than 1 per second. I've been #1 on HN before, and you still only get about 30k hits total with a peak of several per second. So even if your responses take 200ms and you can only handle one at a time, you'll be fine. The HN/Slashdot effect is not hard to handle!
- Retr0id 3y agoI was also on the front page earlier in the week, and I agree with your numbers. Let's call it 1/s peak. If a page is using CGI, it's often (but not always) because it's interactive in some way. If users are interacting and generate 10 requests total, on average, you're down to only 100ms per request (which is about how long it takes my system to spin up a new python3 process and `import numpy`).