News for hackers. Stuff that matters.
Re:Async Queue – One of My Favorite Programming Interviews (... by lazyant on Monday July 07, 2025 @10:49AM (#44490958)
A server that has a spike of load and can't cope with it is pretty normal, hard to characterize as "broken".

When the client(s) can send more work than the server can handle there are three options:

  1 - Do nothing; server drops requests. 
  2 - Server notifies the clients (429 in HTTP) and client backs-off (exponential, jitter). 
  3 - Put the client requests in a queue.
Interview question/solution does 2 in a poor way (just adding a pause), it's part of the client and does 3 in the client, when usually this is done in an intermediate component (RMQ/Kafka/Redis/Db/whatever).

There are no comments on this comment yet.