I'm going to use Stack Overflow as an example, but this fits every app. We render pages in ~18-20ms usually. Great. But what happens when something goes slow? What if SQL takes 2,000ms all of the sudden? What if Redis takes 2,000ms? That's a HUGE increase. When this happens...
-
-
Prikaži ovu nit
-
When normally taken-for-granted fast things go slow, everything waiting on it piles up. Pipelines, connection pools, thread pools, server request queues, load balancers, network stacks...it's a massive snowstorm freeway accident that you can't avoid. Everything falls over.
Prikaži ovu nit -
Timeouts are a cap on the damage/impact. Those victims are written off for the greater good. If we wait on them forever, the pile up becomes too great to recover. Our resources throughout the stack are exhausted and practically users may wait seconds or minutes to get a page.
Prikaži ovu nit -
When servers become unresponsive because processors are spending all of their time *waiting*, context switching, checking thread queues, etc. the game's over if something doesn't give. Timeouts are that "give". They are the moving of that accident to the side of the road.
Prikaži ovu nit -
Don't think of timeouts as your enemy. They're not. If your timeouts are too sensitive, yeah sure, adjust them. But they are your friend. The best way to realize this is to think it through and consider the alternative: what would happen if the timeouts *weren't* there?
Prikaži ovu nit
Kraj razgovora
Novi razgovor -
-
-
@mononcqc has written some good stuff about overload handling (with an Erlang flavour): e.g. https://ferd.ca/queues-don-t-fix-overload.html … and https://ferd.ca/handling-overload.html …. Neither directly talk about timeouts, but they're just another form of load-shedding.Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
If you're just going to retry the thing that timed out though... I think we can agree timeouts might be a problem there
-
mostly referring to outgoing requests though, not incoming
Kraj razgovora
Novi razgovor -
-
-
Whole point around timeouts is that they have to wait for them to arrive. That's A LOT of time waiting. They could be "adding comments" to their code!pic.twitter.com/us1WbFR8SB
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
I think end users complain about them more. What developer doesn't already know this?
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.