3 ms·
Well a proper system should reduce the timeout for the same domain, the more it gets raised, and set it back to default once stats are good again. But it's ver
by BiteCode_dev 3y ago
Well a proper system should reduce the timeout for the same domain, the more it gets raised, and set it back to default once stats are good again.
But it's very complicated and costly to setup, so almost nobody does this.
- toast0 3y agoIf you're building complicated systems, you should probably reduce traffic to sites that are failing to respond, rather than continuing to send traffic, but timeout faster. Depending on what stage in the process the request is failing, it might not make a big difference (in a typical HTTPS exchange, the costs ramp the farther you go, processing a syn < processing a client hello < processing a complex request. (If it's a simple request, processing the client hello is more expensive than the request, of course). If you send all the same traffic, and probably more because of retries with shorter and shorter timeouts, chances are you are going to keep the system overloaded, never detect success and never return to default timeouts. Dropping most of the traffic, and then turning it back on when the system recovers can lead to oscillation where the system works enough to drive more traffic that overloads the system etc, but at least you're getting some processing done.
- BiteCode_dev 3y agoWell, you do need, jitter, exponential backoff, caching, black and white listing, a stat base decision tree, etc. That's why it's a complicated and costly problem. But if you are consuming a lot of API content, if you have crawlers or if you provide features like "get article title/summary/image/thumbs", at some scale it's an important decision to make.