|
|
|
|
|
by GeneralMayhem
116 days ago
|
|
> My current thinking is that queues don’t increase average throughput. Instead, they act as buffers that absorb short-term bursts and timing differences between senders and receivers Absorbing bursts is one purpose for a queue, but often not the only or even most important one. Other reasons include: Correctness reasons: * Providing a durable history of requests that were sent * Creating at-least-once semantics for important (e.g. financial) data Scaling reasons: * Allowing a shuffle between producer and consumer to change shard/key affinity (can be done with direct RPCs, but would need extra library support) * Pipelining variable-cost requests so that consumers can self-rate-limit and stay optimally loaded |
|