0
0
Microservicessystem_design~20 mins

Event-driven vs request-driven in Microservices - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Event-driven vs Request-driven Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding communication style in microservices

Which statement best describes the main difference between event-driven and request-driven communication in microservices?

AEvent-driven uses asynchronous messages to notify changes, while request-driven uses synchronous calls expecting immediate responses.
BEvent-driven requires direct calls between services, while request-driven uses message queues.
CRequest-driven communication is always asynchronous, while event-driven is always synchronous.
DEvent-driven communication does not support decoupling, while request-driven does.
Attempts:
2 left
💡 Hint

Think about how services interact and wait for responses.

Architecture
intermediate
2:00remaining
Choosing communication style for a payment system

You are designing a payment processing microservice that must confirm payment success before updating the order status. Which communication style is most suitable?

AEvent-driven, because it allows the payment service to notify order service asynchronously after processing.
BEvent-driven, because it guarantees immediate response from payment service.
CRequest-driven, because the order service needs immediate confirmation to update status synchronously.
DRequest-driven, because it avoids any communication between services.
Attempts:
2 left
💡 Hint

Consider if the order service needs to wait for payment confirmation before proceeding.

scaling
advanced
2:00remaining
Scaling microservices with event-driven architecture

Which advantage does event-driven architecture provide when scaling microservices under high load?

AIt eliminates the need for message brokers, reducing infrastructure complexity.
BIt forces all services to wait for each other, reducing concurrency issues.
CIt requires synchronous calls that simplify load balancing.
DIt allows services to process events independently and at their own pace, improving scalability and fault tolerance.
Attempts:
2 left
💡 Hint

Think about how asynchronous processing affects service independence and load handling.

tradeoff
advanced
2:00remaining
Tradeoffs between event-driven and request-driven communication

What is a key tradeoff when choosing event-driven communication over request-driven in microservices?

AEvent-driven improves decoupling but can make debugging and tracing harder due to asynchronous flows.
BEvent-driven guarantees immediate responses but increases coupling between services.
CRequest-driven communication eliminates the need for service discovery.
DRequest-driven communication is always faster and more scalable than event-driven.
Attempts:
2 left
💡 Hint

Consider how asynchronous communication affects system observability.

estimation
expert
2:00remaining
Estimating message volume in event-driven microservices

A microservice emits an event for every user action. If the system has 10,000 users each performing 5 actions per minute, estimate the number of events generated per hour.

A30,000 events per hour
B3,000,000 events per hour
C300,000 events per hour
D600,000 events per hour
Attempts:
2 left
💡 Hint

Calculate total actions per minute and multiply by 60 minutes.