Asynchronous Processing for Coupon Issuance Using Redis Pub/Sub
Key point
Oliveyoung combined Redis Pub/Sub and List to solve the over-issuance and data loss problems that occurred during coupon issuance.
Details
Oliveyoung improved its existing Sync-based coupon issuance process to an Async approach in order to reduce user wait times during sale periods with massive traffic.
Initially, they adopted Redis Pub/Sub, but in a multi-Worker environment they experienced a coupon over-issuance problem caused by multiple Workers simultaneously receiving the same message, as well as a data loss problem caused by the lack of message delivery guarantees.
To solve this, they ultimately applied the following architecture:
- Redis Pub/Sub: Used to deliver signals for assigning tasks to a specific Worker
- Redis List: Functions as a queue that stores the actual coupon issuance data
- Worker logic: The assigned Worker checks the size of its own dedicated List, then safely processes the data by retrieving it via LPop
Through this structure, they built an environment capable of handling high traffic while issuing coupons stably without data loss.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.