Here are Peter's Rules 4 Queues (Queue = buffered Go channel, Kafka, ring buffer, whatever) 1. Queues exist only to solve burstiness. If you're not solving burstiness, you should not use a queue.
-
-
Prikaži ovu nit
-
2. Queues should be fixed size, based on infrastructure capacity. An unbounded queue is like a machine with unlimited memory — a delightful fiction.
Prikaži ovu nit -
3. Producers trying to write to a full queue should block, providing backpressure. Consumers reading from a queue that can't process the item in a timely fashion should drop the item and take the next. There is no other sane strategy for dealing with load.
Prikaži ovu nit -
4. Queues belong at the edges of a system, not within it. Remember: queues only solve burstiness, and burstiness can only happen when input size/rate is unknown, and that only happens at the borders. Systems themselves should be deterministic and synchronous.
Prikaži ovu nit -
There's plenty more to learn but those 4 rules will stop you from shooting yourself in the foot. Shamelessly adapted from https://apenwarr.ca/log/20170814 and https://programmingisterrible.com/post/162346490883/how-do-you-cut-a-monolith-in-half …
Prikaži ovu nit
Kraj razgovora
Novi razgovor -
-
-
What would you suggest for an IPC layer and service discovery for thousands of iot devices instead of mqtt?
-
Or, is this anger at the incorrect use of queues in cqrs soa based platforms?
- Još 2 druga odgovora
Novi razgovor -
-
-
Good points. Also, at a higher level, Queues (in the MOM sense) can also increase HA (shielding more delicate legacy back and systems) and provide a more sympathetic level of load balancing than say just round robin, even when at just a constant throughout.
-
What's MOM?
- Još 1 odgovor
Novi razgovor -
-
-
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.
