top | item 39836944

(no title)

luibelgo | 1 year ago

why lifo? can you elaborate?

discuss

order

Darkstryder|1 year ago

LIFO queues with a timeout, and a retry after an exponential backoff with jitter is/was kind of standard for implementing queues at Google. More info in the Google SRE book: https://sre.google/sre-book/addressing-cascading-failures/#x...

treyfitty|1 year ago

The parent comment is asking why LIFO, and you’re responding “because Google does it.” I don’t think this response is helpful.

heavenlyblue|1 year ago

Why is jitter important in a queue?

_3u10|1 year ago

It stands for last in first out.

If you use a linked list it’s like always adding at the head of the list and always removing from the head.

Let’s say you have two clients for your server one sends a reliable 1 request per second, and the other sends 10,000 requests every hour in a burst.

The lifo will basically result in the 1/sec client always getting their requests answered and when you get a burst from the other client most of their requests will get dropped. Assume your server can handle 100 reqs/second with a 1 second time out.