AI Briefing
KO

Analyzing a DB Connection Deadlock in SQS-Based AlimTalk Processing

·2025.12.31 02:30

Key point

This covers the transaction contention issue Oliveyoung encountered—and how they resolved it—when migrating their AlimTalk sending logic to an SQS-based event structure.

Details

The existing AlimTalk structure had business logic and sending logic tightly coupled, causing the business transaction to lengthen and overall system throughput to degrade whenever external API delays occurred.

To address this, they introduced Amazon SQS and redesigned notification sending into an asynchronous event structure. Since each business logic only needs to publish a message to SQS before immediately terminating, transaction occupancy time was minimized and system stability was improved.

The key design features are as follows.

  • Event-driven structure: Decoupled the sending process via SQS to resolve transaction coupling
  • Common interface (NoticeSender): Standardized sending logic per notification type to ensure extensibility
  • Retry mechanism: On failure, history is saved to the DB and periodic resending is performed via Amazon EventBridge

Through these structural improvements, they built an environment where business logic can terminate quickly regardless of whether the notification sending succeeds or fails.

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.