| Users / Events | Domain Events | Integration Events | Notification Events |
|---|---|---|---|
| 100 users | Few domain events per second, simple event handling within services. | Low integration events, direct service calls mostly. | Notifications sent manually or via simple queues. |
| 10,000 users | Hundreds of domain events/sec, event sourcing or CQRS may start. | Integration events increase, async messaging used for decoupling. | Notifications automated, batched, and queued. |
| 1,000,000 users | Thousands of domain events/sec, event stores and replay needed. | High volume integration events, message brokers scale horizontally. | Notifications use push services, throttling, and personalization. |
| 100,000,000 users | Millions of domain events/sec, partitioned event streams, multi-region replication. | Integration events require global event mesh, guaranteed delivery. | Notifications use CDN, multi-channel, and real-time delivery at scale. |
Event types (domain, integration, notification) in Microservices - Scalability & System Analysis
Start learning this pattern below
Jump into concepts and practice - no test required
The first bottleneck is usually the event broker or message queue system handling integration events.
At small scale, domain events are handled within services easily.
As user count grows, the broker's throughput and latency limits appear first because it must reliably deliver many events to multiple consumers.
- Horizontal scaling: Add more broker nodes (e.g., Kafka partitions) to distribute event load.
- Partitioning: Split event streams by domain or customer to isolate traffic.
- Caching: Use caches for notification content to reduce recomputation.
- Event filtering: Consumers subscribe only to relevant events to reduce processing.
- Backpressure and throttling: Control event flow to avoid overload.
- Multi-region replication: For global scale, replicate event brokers closer to users.
- At 1M users, assume 10 domain events/user/day -> ~115 events/sec.
- Integration events multiply by number of services; assume 10x domain events -> ~1,150 events/sec.
- Notification events depend on user activity; assume 5 notifications/user/day -> ~58 notifications/sec peak.
- Storage: Event logs grow by millions daily; need scalable storage like distributed logs.
- Bandwidth: Event payloads small (~1KB), so 1,150 events/sec ≈ 1.15 MB/s; notifications may require more bandwidth if multimedia.
Start by defining each event type clearly: domain, integration, notification.
Explain how their scale differs and why their bottlenecks differ.
Discuss the event flow and how you would scale each component step-by-step.
Use real numbers to show understanding of throughput and storage.
Your event broker handles 1000 QPS integration events. Traffic grows 10x. What do you do first?
Answer: Add partitions and broker nodes to horizontally scale the event broker, distributing load and maintaining throughput.
Practice
Solution
Step 1: Understand event types in microservices
Domain events represent significant business actions occurring within a single service boundary.Step 2: Differentiate from other event types
Integration events share data between services, and notification events alert users or external systems, so they are not internal business actions.Final Answer:
Domain event -> Option AQuick Check:
Business action inside service = Domain event [OK]
- Confusing integration events with domain events
- Thinking notification events capture business logic
- Assuming system event is a standard event type
Solution
Step 1: Define integration events
Integration events are designed to share information or changes between different microservices to keep them in sync.Step 2: Eliminate incorrect options
UI updates are usually local, alerts to users are notification events, and error logs are internal diagnostics, not integration events.Final Answer:
An event that shares information between different services -> Option BQuick Check:
Sharing info between services = Integration event [OK]
- Mixing notification events with integration events
- Thinking integration events only affect one service
- Confusing error logs with integration events
publishEvent({ type: 'UserRegistered', payload: { userId: 123 } });
What type of event is this most likely representing?Solution
Step 1: Analyze the event name and context
The event 'UserRegistered' indicates a business action inside the service, such as a user signing up.Step 2: Match event type to definition
Since it captures a business action inside the service, it is a domain event, not a notification or integration event.Final Answer:
Domain event -> Option DQuick Check:
Business action event = Domain event [OK]
- Assuming all events are integration events
- Confusing notification events with domain events
- Ignoring event naming conventions
Solution
Step 1: Identify the event purpose
The event is meant to notify users, which fits the notification event type.Step 2: Understand event labeling importance
Labeling a notification event as an integration event causes confusion and wrong handling in the system.Final Answer:
Notification events should not be labeled as integration events -> Option CQuick Check:
Correct event labeling avoids confusion [OK]
- Mixing notification and integration event roles
- Assuming integration events can't have user data
- Thinking notification events are internal only
Solution
Step 1: Map actions to event types
Updating internal user stats is a business action inside the service, so it is a domain event.Step 2: Identify cross-service communication
Notifying other services requires sharing information between services, so it is an integration event.Step 3: Recognize user alerts
Sending a welcome email is a message to the user, which fits notification events.Final Answer:
Domain event, integration event, notification event -> Option AQuick Check:
Internal action, cross-service, user alert = Domain, Integration, Notification [OK]
- Swapping integration and notification events
- Using domain events for cross-service communication
- Confusing notification with domain events
