Methodology GuideComputer SystemsDesign Science Research
Event-Driven Architecture: Building Cloud Systems That Bend Without Breaking
Synchronous request-response architectures are brittleโone slow service degrades the entire system. Event-driven architectures decouple services through message queues, absorbing traffic spikes and isolating failures. This methodology guide covers when to use EDA, how to design it, and what pitfalls to avoid.
By Sean K.S. Shin
This blog summarizes research trends based on published paper abstracts. Specific numbers or findings may contain inaccuracies. For scholarly rigor, always consult the original papers cited in each post.
In a synchronous microservice architecture, a user request triggers a chain of service-to-service calls: the API gateway calls the authentication service, which calls the user service, which calls the database, which returns data back through the chain. If any service in this chain is slow or unavailable, the entire request blocksโand the user waits. Under load, these chains amplify latency: a 100ms slowdown in one service cascades to seconds of delay at the user level.
Event-driven architecture (EDA) replaces these synchronous chains with asynchronous message passing. Instead of calling the next service directly, each service publishes an event to a message queue. Interested services consume events at their own pace. The message queue acts as a bufferโabsorbing traffic spikes, isolating service failures, and enabling each service to operate independently of the others' availability.
Muppa's analysis of cloud-native event processing and Avinash's survey of microservice scaling patterns collectively provide the architectural guidance needed to design, implement, and operate event-driven systems in production cloud environments.
When to Use Event-Driven Architecture
EDA is not universally appropriate. The decision to adopt it should be driven by specific architectural requirements:
Use EDA when:
- Decoupling is critical: Services developed by different teams on different schedules need to evolve independently. Asynchronous communication via events enables this independence.
- Traffic is bursty: Seasonal sales, breaking news events, or batch job completions create load spikes that synchronous systems cannot absorb gracefully. Message queues buffer these spikes.
- Eventual consistency is acceptable: If the system can tolerate short delays between an action and its effects (order placed โ inventory updated within seconds, not milliseconds), EDA reduces complexity substantially.
- Failure isolation is essential: A payment processing failure should not prevent users from browsing products. EDA isolates these domains.
Avoid EDA when:
- Immediate consistency is required: Financial transactions that must be immediately consistent across accounts are poorly served by eventually-consistent event processing.
- Request-response semantics are needed: User-facing APIs that must return results synchronously (search, authentication) do not benefit from asynchronous decoupling.
- System complexity budget is limited: EDA introduces operational complexity (message broker management, dead letter queues, idempotency handling) that small teams may not have capacity to manage.
Core Patterns
Muppa identifies five core EDA patterns for cloud-native systems:
Event notification: A service announces that something happened ("OrderPlaced"), without specifying what other services should do about it. Interested services subscribe and take appropriate action. This pattern maximizes decoupling but requires careful event schema design.
Event-carried state transfer: Events carry the full data needed for processing ("OrderPlaced: {customerId, items, totalAmount, shippingAddress}"). Consumer services do not need to call back to the producer to get the data they need. This reduces runtime coupling but increases event size and raises data duplication concerns.
Event sourcing: Rather than storing current state, the system stores the sequence of events that produced that state. The current state is derived by replaying events. This pattern provides a complete audit trail and enables temporal queries ("What was the inventory level at 3pm yesterday?") but requires careful management of event store growth.
CQRS (Command Query Responsibility Segregation): Separate write models (optimized for processing commands) from read models (optimized for serving queries). Events propagate changes from write to read models. This pattern enables each model to be optimized independently but introduces complexity in maintaining read model consistency.
Saga pattern: Long-running business processes that span multiple services are coordinated through a sequence of events and compensating actions. If step 3 of a 5-step process fails, the saga triggers compensating events that undo steps 1 and 2. This replaces distributed transactions with eventual consistency and explicit compensation logic.
Operational Challenges
The theoretical elegance of EDA encounters practical friction in production:
- Message ordering: Kafka guarantees ordering within a partition but not across partitions. If order matters (process payment before shipping), the system must ensure related events land in the same partitionโa constraint that affects scaling.
- Exactly-once processing: Message brokers guarantee at-least-once delivery. Achieving exactly-once processing requires idempotent consumersโservices that produce the same result whether an event is processed once or multiple times. Building idempotency into every consumer is non-trivial.
- Dead letter queues: Events that cannot be processed (malformed data, consumer bugs) must be routed to dead letter queues for inspection. Without proper dead letter handling, failed events are silently lost.
- Monitoring and debugging: Tracing a request through a synchronous chain is straightforward. Tracing an event through an asynchronous pipeline requires distributed tracing infrastructure (correlation IDs, trace propagation) that adds operational overhead.
Claims and Evidence
<
| Claim | Evidence | Verdict |
|---|
| EDA improves resilience against traffic spikes | Message queue buffering documented across multiple production systems | โ
Well-established |
| EDA reduces inter-service coupling | Architectural principle with strong theoretical foundation | โ
Supported |
| EDA introduces operational complexity | Dead letter queues, idempotency, ordering challenges documented | โ
Supported |
| EDA is appropriate for all microservice architectures | Latency-sensitive and consistency-critical workloads are poorly served | โ Situational |
| Event sourcing provides superior auditability | Complete event history enables temporal queries and replay | โ
Supported |
Open Questions
Schema evolution: As event schemas change over time, how do you maintain compatibility with consumers that expect older versions? Schema registries and versioning strategies help but add complexity.Testing: Testing asynchronous event-driven systems is harder than testing synchronous systems. How do you write integration tests that verify correct behavior across asynchronous service boundaries?Cost: Message brokers (Kafka, Pulsar, EventBridge) have operational costsโcompute, storage, network bandwidth. For systems with high event volumes, these costs can be substantial. What is the break-even point where EDA's resilience benefits justify its operational costs?Hybrid architectures: Most production systems mix synchronous and asynchronous communication. What principles should guide the decision of which interactions are synchronous and which are event-driven?What This Means for Your Research
For distributed systems researchers, EDA patterns (event sourcing, CQRS, sagas) provide rich formal modeling challengesโparticularly around consistency guarantees, failure semantics, and performance bounds in eventually-consistent systems.
For cloud architects, EDA is not a binary choiceโit is a spectrum of patterns that can be adopted incrementally. Starting with event notification for non-critical paths and expanding to event sourcing and CQRS for domains that benefit is a practical adoption strategy.
๋ฉด์ฑ
์กฐํญ: ์ด ๊ฒ์๋ฌผ์ ์ ๋ณด ์ ๊ณต์ ๋ชฉ์ ์ผ๋ก ํ ์ฐ๊ตฌ ๋ํฅ ๊ฐ์์ด๋ค. ํ์ ์ ์๋ฌผ์์ ์ธ์ฉํ๊ธฐ ์ ์ ๊ตฌ์ฒด์ ์ธ ์ฐ๊ตฌ ๊ฒฐ๊ณผ, ํต๊ณ ๋ฐ ์ฃผ์ฅ์ ์๋ณธ ๋
ผ๋ฌธ๊ณผ ๋์กฐํ์ฌ ๊ฒ์ฆํด์ผ ํ๋ค.
์ด๋ฒคํธ ๊ธฐ๋ฐ ์ํคํ
์ฒ: ์ ์ฐํ๊ฒ ๊ตฝํ๋ ๊บพ์ด์ง ์๋ ํด๋ผ์ฐ๋ ์์คํ
๊ตฌ์ถ
๋๊ธฐ์ ๋ง์ดํฌ๋ก์๋น์ค ์ํคํ
์ฒ์์ ์ฌ์ฉ์ ์์ฒญ์ ์๋น์ค ๊ฐ ํธ์ถ ์ฒด์ธ์ ์ ๋ฐํ๋ค. API ๊ฒ์ดํธ์จ์ด๊ฐ ์ธ์ฆ ์๋น์ค๋ฅผ ํธ์ถํ๊ณ , ์ธ์ฆ ์๋น์ค๋ ์ฌ์ฉ์ ์๋น์ค๋ฅผ ํธ์ถํ๋ฉฐ, ์ฌ์ฉ์ ์๋น์ค๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ํธ์ถํ๊ณ , ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ ์ฒด์ธ์ ํตํด ๋ฐ์ดํฐ๋ฅผ ๋ฐํํ๋ค. ์ด ์ฒด์ธ์์ ์ด๋ ์๋น์ค ํ๋๋ผ๋ ๋๋ฆฌ๊ฑฐ๋ ์ฌ์ฉ ๋ถ๊ฐ ์ํ๊ฐ ๋๋ฉด ์ ์ฒด ์์ฒญ์ด ์ฐจ๋จ๋๊ณ , ์ฌ์ฉ์๋ ๋๊ธฐํด์ผ ํ๋ค. ๋ถํ๊ฐ ๊ฑธ๋ฆด ๊ฒฝ์ฐ ์ด๋ฌํ ์ฒด์ธ์ ์ง์ฐ ์๊ฐ์ ์ฆํญ์ํจ๋ค. ํ ์๋น์ค์์ 100ms์ ์ง์ฐ์ด ๋ฐ์ํ๋ฉด ์ฌ์ฉ์ ์์ค์์๋ ์ ์ด์ ์ง์ฐ์ผ๋ก ์ด์ด์ง๋ค.
์ด๋ฒคํธ ๊ธฐ๋ฐ ์ํคํ
์ฒ(EDA)๋ ์ด๋ฌํ ๋๊ธฐ์ ์ฒด์ธ์ ๋น๋๊ธฐ ๋ฉ์์ง ์ ๋ฌ๋ก ๋์ฒดํ๋ค. ๋ค์ ์๋น์ค๋ฅผ ์ง์ ํธ์ถํ๋ ๋์ , ๊ฐ ์๋น์ค๋ ๋ฉ์์ง ํ์ ์ด๋ฒคํธ๋ฅผ ๊ฒ์ํ๋ค. ๊ด์ฌ ์๋ ์๋น์ค๋ค์ ์์ ์ ์๋์ ๋ง์ถฐ ์ด๋ฒคํธ๋ฅผ ์๋นํ๋ค. ๋ฉ์์ง ํ๋ ์์ถฉ์ฌ ์ญํ ์ ํ์ฌ ํธ๋ํฝ ๊ธ์ฆ์ ํก์ํ๊ณ , ์๋น์ค ์ฅ์ ๋ฅผ ๊ฒฉ๋ฆฌํ๋ฉฐ, ๊ฐ ์๋น์ค๊ฐ ๋ค๋ฅธ ์๋น์ค์ ๊ฐ์ฉ์ฑ๊ณผ ๋ฌด๊ดํ๊ฒ ๋
๋ฆฝ์ ์ผ๋ก ์ด์๋ ์ ์๋๋ก ํ๋ค.
Muppa์ ํด๋ผ์ฐ๋ ๋ค์ดํฐ๋ธ ์ด๋ฒคํธ ์ฒ๋ฆฌ ๋ถ์๊ณผ Avinash์ ๋ง์ดํฌ๋ก์๋น์ค ์ค์ผ์ผ๋ง ํจํด ์กฐ์ฌ๋ ํ๋ก๋์
ํด๋ผ์ฐ๋ ํ๊ฒฝ์์ ์ด๋ฒคํธ ๊ธฐ๋ฐ ์์คํ
์ ์ค๊ณ, ๊ตฌํ, ์ด์ํ๋ ๋ฐ ํ์ํ ์ํคํ
์ฒ ์ง์นจ์ ์ข
ํฉ์ ์ผ๋ก ์ ๊ณตํ๋ค.
์ด๋ฒคํธ ๊ธฐ๋ฐ ์ํคํ
์ฒ์ ์ ์ฉ ์์
EDA๊ฐ ๋ชจ๋ ์ํฉ์ ์ ํฉํ ๊ฒ์ ์๋๋ค. EDA ๋์
๊ฒฐ์ ์ ํน์ ์ํคํ
์ฒ ์๊ตฌ์ฌํญ์ ์ํด ์ฃผ๋๋์ด์ผ ํ๋ค.
EDA๋ฅผ ์ฌ์ฉํด์ผ ํ ๋:
- ๋์ปคํ๋ง์ด ์ค์ํ ๋: ์๋ก ๋ค๋ฅธ ํ์ด ์๋ก ๋ค๋ฅธ ์ผ์ ์ผ๋ก ๊ฐ๋ฐํ๋ ์๋น์ค๋ค์ ๋
๋ฆฝ์ ์ผ๋ก ์งํํ ํ์๊ฐ ์๋ค. ์ด๋ฒคํธ๋ฅผ ํตํ ๋น๋๊ธฐ ํต์ ์ด ์ด๋ฌํ ๋
๋ฆฝ์ฑ์ ๊ฐ๋ฅํ๊ฒ ํ๋ค.
- ํธ๋ํฝ์ด ํญ๋ฐ์ ์ผ๋ก ๋ณ๋ํ ๋: ๊ณ์ ์ ํ๋งค, ์๋ณด ์ด๋ฒคํธ, ๋๋ ๋ฐฐ์น ์์
์๋ฃ๋ ๋๊ธฐ์ ์์คํ
์ด ์ํํ๊ฒ ํก์ํ ์ ์๋ ๋ถํ ๊ธ์ฆ์ ์ ๋ฐํ๋ค. ๋ฉ์์ง ํ๋ ์ด๋ฌํ ๊ธ์ฆ์ ์์ถฉํ๋ค.
- ์ต์ข
์ ์ผ๊ด์ฑ์ด ํ์ฉ๋ ๋: ์์คํ
์ด ์ด๋ค ํ๋๊ณผ ๊ทธ ํจ๊ณผ ์ฌ์ด์ ์งง์ ์ง์ฐ์ ํ์ฉํ ์ ์๋ค๋ฉด(์ฃผ๋ฌธ ์ ์ โ ์ ๋ฐ๋ฆฌ์ด๊ฐ ์๋ ์ ์ด ๋ด ์ฌ๊ณ ์
๋ฐ์ดํธ), EDA๋ ๋ณต์ก์ฑ์ ์๋นํ ์ค์ธ๋ค.
- ์ฅ์ ๊ฒฉ๋ฆฌ๊ฐ ํ์์ ์ผ ๋: ๊ฒฐ์ ์ฒ๋ฆฌ ์ฅ์ ๊ฐ ์ฌ์ฉ์์ ์ํ ํ์์ ๋ฐฉํดํด์๋ ์ ๋๋ค. EDA๋ ์ด๋ฌํ ๋๋ฉ์ธ๋ค์ ๊ฒฉ๋ฆฌํ๋ค.
EDA๋ฅผ ํผํด์ผ ํ ๋:
- ์ฆ๊ฐ์ ์ธ ์ผ๊ด์ฑ์ด ํ์ํ ๋: ๊ณ์ข ๊ฐ์ ์ฆ๊ฐ์ ์ธ ์ผ๊ด์ฑ์ด ๋ณด์ฅ๋์ด์ผ ํ๋ ๊ธ์ต ๊ฑฐ๋๋ ์ต์ข
์ ์ผ๊ด์ฑ์ ์ด๋ฒคํธ ์ฒ๋ฆฌ ๋ฐฉ์์ผ๋ก๋ ์ ์ ํ ์ฒ๋ฆฌ๋์ง ์๋๋ค.
- ์์ฒญ-์๋ต ์๋ฏธ๋ก ์ด ํ์ํ ๋: ๋๊ธฐ์ ์ผ๋ก ๊ฒฐ๊ณผ๋ฅผ ๋ฐํํด์ผ ํ๋ ์ฌ์ฉ์ ๋๋ฉด API(๊ฒ์, ์ธ์ฆ)๋ ๋น๋๊ธฐ ๋์ปคํ๋ง์ ์ด์ ์ ์ป์ง ๋ชปํ๋ค.
- ์์คํ
๋ณต์ก์ฑ ์์ฐ์ด ์ ํ์ ์ผ ๋: EDA๋ ์๊ท๋ชจ ํ์ด ๊ด๋ฆฌํ ์ญ๋์ด ์์ ์ ์๋ ์ด์ ๋ณต์ก์ฑ(๋ฉ์์ง ๋ธ๋ก์ปค ๊ด๋ฆฌ, ๋ฐ๋ ๋ ํฐ ํ, ๋ฉฑ๋ฑ์ฑ ์ฒ๋ฆฌ)์ ๋์
ํ๋ค.
ํต์ฌ ํจํด
Muppa๋ ํด๋ผ์ฐ๋ ๋ค์ดํฐ๋ธ ์์คํ
์ ์ํ ๋ค์ฏ ๊ฐ์ง ํต์ฌ EDA ํจํด์ ์ ์ํ๋ค.
์ด๋ฒคํธ ์๋ฆผ: ์๋น์ค๊ฐ ์ด๋ค ์ผ์ด ๋ฐ์ํ์์ ์๋ฆฌ๋("OrderPlaced"), ๋ค๋ฅธ ์๋น์ค๋ค์ด ์ด์ ๋ํด ๋ฌด์์ ํด์ผ ํ๋์ง๋ ๋ช
์ํ์ง ์๋๋ค. ๊ด์ฌ ์๋ ์๋น์ค๋ค์ ๊ตฌ๋
ํ์ฌ ์ ์ ํ ์กฐ์น๋ฅผ ์ทจํ๋ค. ์ด ํจํด์ ๋์ปคํ๋ง์ ๊ทน๋ํํ์ง๋ง ์ ์คํ ์ด๋ฒคํธ ์คํค๋ง ์ค๊ณ๊ฐ ํ์ํ๋ค.
์ด๋ฒคํธ ์ ๋ฌ ์ํ ์ด์ : ์ด๋ฒคํธ๊ฐ ์ฒ๋ฆฌ์ ํ์ํ ์ ์ฒด ๋ฐ์ดํฐ๋ฅผ ๋ด๋๋ค("OrderPlaced: {customerId, items, totalAmount, shippingAddress}"). ์๋น ์๋น์ค๋ ํ์ํ ๋ฐ์ดํฐ๋ฅผ ์ป๊ธฐ ์ํด ์์ฐ์์๊ฒ ์ฝ๋ฐฑ์ ํ ํ์๊ฐ ์๋ค. ์ด ๋ฐฉ์์ ๋ฐํ์ ๊ฒฐํฉ๋๋ฅผ ์ค์ด์ง๋ง ์ด๋ฒคํธ ํฌ๊ธฐ๊ฐ ์ฆ๊ฐํ๊ณ ๋ฐ์ดํฐ ์ค๋ณต ๋ฌธ์ ๋ฅผ ์ผ๊ธฐํ๋ค.
์ด๋ฒคํธ ์์ฑ: ํ์ฌ ์ํ๋ฅผ ์ ์ฅํ๋ ๋์ , ์์คํ
์ ํด๋น ์ํ๋ฅผ ์์ฑํ ์ด๋ฒคํธ์ ์ํ์ค๋ฅผ ์ ์ฅํ๋ค. ํ์ฌ ์ํ๋ ์ด๋ฒคํธ๋ฅผ ์ฌ์ํ์ฌ ๋์ถ๋๋ค. ์ด ํจํด์ ์์ ํ ๊ฐ์ฌ ์ถ์ ์ ์ ๊ณตํ๊ณ ์๊ฐ์ ์ฟผ๋ฆฌ("์ด์ ์คํ 3์์ ์ฌ๊ณ ์์ค์ ์ผ๋ง์๋๊ฐ?")๋ฅผ ๊ฐ๋ฅํ๊ฒ ํ์ง๋ง, ์ด๋ฒคํธ ์ ์ฅ์์ ์ฆ๊ฐ์ ๋ํ ์ ์คํ ๊ด๋ฆฌ๊ฐ ํ์ํ๋ค.
CQRS (Command Query Responsibility Segregation): ์ฐ๊ธฐ ๋ชจ๋ธ(๋ช
๋ น ์ฒ๋ฆฌ์ ์ต์ ํ)๊ณผ ์ฝ๊ธฐ ๋ชจ๋ธ(์ฟผ๋ฆฌ ์ ๊ณต์ ์ต์ ํ)์ ๋ถ๋ฆฌํ๋ค. ์ด๋ฒคํธ๋ ์ฐ๊ธฐ ๋ชจ๋ธ์์ ์ฝ๊ธฐ ๋ชจ๋ธ๋ก ๋ณ๊ฒฝ ์ฌํญ์ ์ ํํ๋ค. ์ด ํจํด์ ํตํด ๊ฐ ๋ชจ๋ธ์ ๋
๋ฆฝ์ ์ผ๋ก ์ต์ ํํ ์ ์์ง๋ง, ์ฝ๊ธฐ ๋ชจ๋ธ์ ์ผ๊ด์ฑ์ ์ ์งํ๋ ๋ฐ ๋ณต์ก์ฑ์ด ์๋ฐ๋๋ค.
Saga ํจํด: ์ฌ๋ฌ ์๋น์ค์ ๊ฑธ์ณ ์คํ๋๋ ์ฅ๊ธฐ ์คํ ๋น์ฆ๋์ค ํ๋ก์ธ์ค๋ ์ผ๋ จ์ ์ด๋ฒคํธ์ ๋ณด์ ์ก์
์ ํตํด ์กฐ์จ๋๋ค. 5๋จ๊ณ ํ๋ก์ธ์ค ์ค 3๋จ๊ณ๊ฐ ์คํจํ๋ฉด, saga๋ 1๋จ๊ณ์ 2๋จ๊ณ๋ฅผ ๋๋๋ฆฌ๋ ๋ณด์ ์ด๋ฒคํธ๋ฅผ ํธ๋ฆฌ๊ฑฐํ๋ค. ์ด๋ ๋ถ์ฐ ํธ๋์ญ์
์ ์ต์ข
์ ์ผ๊ด์ฑ๊ณผ ๋ช
์์ ๋ณด์ ๋ก์ง์ผ๋ก ๋์ฒดํ๋ค.
์ด์์์ ๊ณผ์
EDA์ ์ด๋ก ์ ์ฐ์ํจ์ ํ๋ก๋์
ํ๊ฒฝ์์ ์ค์ง์ ์ธ ๋ง์ฐฐ์ ์ง๋ฉดํ๋ค:
- ๋ฉ์์ง ์์: Kafka๋ ํํฐ์
๋ด ์์๋ ๋ณด์ฅํ์ง๋ง ํํฐ์
๊ฐ ์์๋ ๋ณด์ฅํ์ง ์๋๋ค. ์์๊ฐ ์ค์ํ ๊ฒฝ์ฐ(๋ฐฐ์ก ์ ๊ฒฐ์ ์ฒ๋ฆฌ), ์์คํ
์ ๊ด๋ จ ์ด๋ฒคํธ๊ฐ ๋์ผํ ํํฐ์
์ ๋ฐฐ์น๋๋๋ก ๋ณด์ฅํด์ผ ํ๋ฉฐ, ์ด๋ ์ค์ผ์ผ๋ง์ ์ํฅ์ ๋ฏธ์น๋ ์ ์ฝ์ด ๋๋ค.
- ์ ํํ ํ ๋ฒ ์ฒ๋ฆฌ(Exactly-once processing): ๋ฉ์์ง ๋ธ๋ก์ปค๋ ์ต์ ํ ๋ฒ ์ ๋ฌ(at-least-once delivery)์ ๋ณด์ฅํ๋ค. ์ ํํ ํ ๋ฒ ์ฒ๋ฆฌ๋ฅผ ๋ฌ์ฑํ๋ ค๋ฉด ๋ฉฑ๋ฑ์ฑ(idempotent) ์ปจ์๋จธ๊ฐ ํ์ํ๋ฐ, ์ด๋ ์ด๋ฒคํธ๋ฅผ ํ ๋ฒ ์ฒ๋ฆฌํ๋ ์ฌ๋ฌ ๋ฒ ์ฒ๋ฆฌํ๋ ๋์ผํ ๊ฒฐ๊ณผ๋ฅผ ์์ฑํ๋ ์๋น์ค๋ฅผ ์๋ฏธํ๋ค. ๋ชจ๋ ์ปจ์๋จธ์ ๋ฉฑ๋ฑ์ฑ์ ๊ตฌ์ถํ๋ ๊ฒ์ ๊ฐ๋จํ ์ผ์ด ์๋๋ค.
- Dead letter queue: ์ฒ๋ฆฌํ ์ ์๋ ์ด๋ฒคํธ(์๋ชป๋ ํ์์ ๋ฐ์ดํฐ, ์ปจ์๋จธ ๋ฒ๊ทธ)๋ ๊ฒ์ฌ๋ฅผ ์ํด dead letter queue๋ก ๋ผ์ฐํ
๋์ด์ผ ํ๋ค. ์ ์ ํ dead letter ์ฒ๋ฆฌ๊ฐ ์์ผ๋ฉด, ์คํจํ ์ด๋ฒคํธ๋ ์๋ฆฌ ์์ด ์ฌ๋ผ์ง๋ค.
- ๋ชจ๋ํฐ๋ง ๋ฐ ๋๋ฒ๊น
: ๋๊ธฐ์ ์ฒด์ธ์์ ์์ฒญ์ ์ถ์ ํ๋ ๊ฒ์ ๊ฐ๋จํ๋ค. ๋น๋๊ธฐ ํ์ดํ๋ผ์ธ์์ ์ด๋ฒคํธ๋ฅผ ์ถ์ ํ๋ ค๋ฉด ์ด์ ์ค๋ฒํค๋๋ฅผ ์ถ๊ฐํ๋ ๋ถ์ฐ ์ถ์ ์ธํ๋ผ(correlation ID, trace ์ ํ)๊ฐ ํ์ํ๋ค.
์ฃผ์ฅ๊ณผ ๊ทผ๊ฑฐ
<
| ์ฃผ์ฅ | ๊ทผ๊ฑฐ | ํ๊ฐ |
|---|
| EDA๋ ํธ๋ํฝ ๊ธ์ฆ์ ๋ํ ๋ณต์๋ ฅ์ ํฅ์์ํจ๋ค | ๋ค์์ ํ๋ก๋์
์์คํ
์์ ๋ฌธ์ํ๋ ๋ฉ์์ง ํ ๋ฒํผ๋ง | โ
์ ํ๋ฆฝ๋จ |
| EDA๋ ์๋น์ค ๊ฐ ๊ฒฐํฉ๋๋ฅผ ์ค์ธ๋ค | ๊ฐ๋ ฅํ ์ด๋ก ์ ๊ธฐ๋ฐ์ ๊ฐ์ง ์ํคํ
์ฒ ์์น | โ
์ง์ง๋จ |
| EDA๋ ์ด์ ๋ณต์ก์ฑ์ ์๋ฐํ๋ค | Dead letter queue, ๋ฉฑ๋ฑ์ฑ, ์์ ๊ด๋ จ ๊ณผ์ ๊ฐ ๋ฌธ์ํ๋จ | โ
์ง์ง๋จ |
| EDA๋ ๋ชจ๋ ๋ง์ดํฌ๋ก์๋น์ค ์ํคํ
์ฒ์ ์ ํฉํ๋ค | ์ง์ฐ ์๊ฐ์ ๋ฏผ๊ฐํ๊ณ ์ผ๊ด์ฑ์ด ์ค์ํ ์ํฌ๋ก๋์๋ ๋ถ์ ํฉ | โ ์ํฉ์ ๋ฐ๋ผ ๋ค๋ฆ |
| ์ด๋ฒคํธ ์์ฑ์ ์ฐ์ํ ๊ฐ์ฌ ์ถ์ ์ฑ์ ์ ๊ณตํ๋ค | ์์ ํ ์ด๋ฒคํธ ์ด๋ ฅ์ด ์๊ฐ์ ์ฟผ๋ฆฌ ๋ฐ ์ฌ์คํ์ ๊ฐ๋ฅํ๊ฒ ํจ | โ
์ง์ง๋จ |
๋ฏธํด๊ฒฐ ์ง๋ฌธ
์คํค๋ง ์งํ: ์ด๋ฒคํธ ์คํค๋ง๊ฐ ์๊ฐ์ด ์ง๋จ์ ๋ฐ๋ผ ๋ณ๊ฒฝ๋ ๋, ์ด์ ๋ฒ์ ์ ๊ธฐ๋ํ๋ ์ปจ์๋จธ์์ ํธํ์ฑ์ ์ด๋ป๊ฒ ์ ์งํ ๊ฒ์ธ๊ฐ? ์คํค๋ง ๋ ์ง์คํธ๋ฆฌ์ ๋ฒ์ ๊ด๋ฆฌ ์ ๋ต์ด ๋์์ด ๋์ง๋ง ๋ณต์ก์ฑ์ ์ถ๊ฐํ๋ค.ํ
์คํ
: ๋น๋๊ธฐ ์ด๋ฒคํธ ๊ธฐ๋ฐ ์์คํ
์ ํ
์คํธํ๋ ๊ฒ์ ๋๊ธฐ ์์คํ
์ ํ
์คํธํ๋ ๊ฒ๋ณด๋ค ๋ ์ด๋ ต๋ค. ๋น๋๊ธฐ ์๋น์ค ๊ฒฝ๊ณ์ ๊ฑธ์ณ ์ฌ๋ฐ๋ฅธ ๋์์ ๊ฒ์ฆํ๋ ํตํฉ ํ
์คํธ๋ฅผ ์ด๋ป๊ฒ ์์ฑํ ๊ฒ์ธ๊ฐ?๋น์ฉ: ๋ฉ์์ง ๋ธ๋ก์ปค(Kafka, Pulsar, EventBridge)๋ ์ปดํจํ
, ์คํ ๋ฆฌ์ง, ๋คํธ์ํฌ ๋์ญํญ ๋ฑ์ ์ด์ ๋น์ฉ์ด ๋ฐ์ํ๋ค. ์ด๋ฒคํธ ๋ณผ๋ฅจ์ด ๋์ ์์คํ
์ ๊ฒฝ์ฐ ์ด๋ฌํ ๋น์ฉ์ด ์๋นํ ์ ์๋ค. EDA์ ๋ณต์๋ ฅ ์ด์ ์ด ์ด์ ๋น์ฉ์ ์ ๋นํํ๋ ์์ต๋ถ๊ธฐ์ ์ ์ด๋์ธ๊ฐ?ํ์ด๋ธ๋ฆฌ๋ ์ํคํ
์ฒ: ๋๋ถ๋ถ์ ํ๋ก๋์
์์คํ
์ ๋๊ธฐ์๊ณผ ๋น๋๊ธฐ์ ํต์ ์ ํผํฉํ์ฌ ์ฌ์ฉํ๋ค. ์ด๋ค ์ํธ์์ฉ์ ๋๊ธฐ์์ผ๋ก, ์ด๋ค ๊ฒ์ ์ด๋ฒคํธ ๊ธฐ๋ฐ์ผ๋ก ํ ์ง ๊ฒฐ์ ์ ์๋ดํ๋ ์์น์ ๋ฌด์์ธ๊ฐ?์ฐ๊ตฌ์์ ๋ํ ์์ฌ์
๋ถ์ฐ ์์คํ
์ฐ๊ตฌ์๋ค์๊ฒ EDA ํจํด(์ด๋ฒคํธ ์์ฑ, CQRS, saga)์ ํ๋ถํ ํ์์ ๋ชจ๋ธ๋ง ๊ณผ์ ๋ฅผ ์ ๊ณตํ๋ฉฐ, ํนํ ์ต์ข
์ ์ผ๊ด์ฑ ์์คํ
์์์ ์ผ๊ด์ฑ ๋ณด์ฅ, ์คํจ ์๋ฏธ๋ก , ์ฑ๋ฅ ํ๊ณ์ ๊ดํ ์ฐ๊ตฌ์ ์ ํฉํ๋ค.
ํด๋ผ์ฐ๋ ์ํคํ
ํธ์๊ฒ EDA๋ ์ด๋ถ๋ฒ์ ์ ํ์ด ์๋๋ผ, ์ ์ง์ ์ผ๋ก ์ฑํํ ์ ์๋ ํจํด์ ์คํํธ๋ผ์ด๋ค. ๋นํต์ฌ ๊ฒฝ๋ก์ ์ด๋ฒคํธ ์๋ฆผ์ ์ ์ฉํ๋ ๊ฒ๋ถํฐ ์์ํ์ฌ, ์ด์ ์ด ์๋ ๋๋ฉ์ธ์ ์ด๋ฒคํธ ์์ฑ๊ณผ CQRS๋ฅผ ํ์ฅ ์ ์ฉํ๋ ๊ฒ์ด ์ค์ฉ์ ์ธ ๋์
์ ๋ต์ด๋ค.
References (2)
[1] Muppa, V. (2025). Cloud-native event processing: Designing scalable and resilient event-driven systems. World Journal of Advanced Engineering Technology and Sciences.
[2] Avinash, K. (2025). Architectural Approaches to Scaling Distributed Microservice Systems in The Cloud. The American Journal of Engineering and Technology.