System Design Patterns: From Fundamentals to Real Systems
0% completed
Partitioned Consumption
Which of the stream job's 24 workers must process this customer's cancel? At 14:10:05, customer u_204 places order ord_9120 for $40, and at 14:10:45 she cancels it. Both events wait in the store's orders log. The job keeps each new order in its memory for 30 minutes. A cancel within that time removes the order from revenue.
If any free worker could take any event, the two events could go to two different workers. The worker that takes the cancel would find no order in its memory and would skip it. The worker that holds the order would never learn about the cancel
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%