Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. Event-driven vs request-response

Batch & Streaming · Streaming Processing

Event-driven vs request-response

Easystream-23
event-drivenrequest-responsearchitectureKafka

Question

What is the difference between event-driven architecture and request-response?

Solution

Request-response (synchronous): a client calls a service and waits for an answer. HTTP APIs, RPCs, "get user by id."

Event-driven (asynchronous): a producer emits a fact ("OrderPlaced") to a bus/log. Consumers react when they can. The producer does not wait for every downstream system.

Request-response:
  Client --HTTP--> Service --JSON--> Client
  (tight coupling in time)

Event-driven:
  Orders --event--> Kafka --+--> warehouse
                            +--> email service
                            +--> fraud
  (decoupled in time and space)

DE angle

Pipelines are often event-driven on the ingest side (CDC, clickstream) even when serving APIs remain request-response.

Interview tip: Contrast *who waits* and *who knows about whom*. Events decouple producers from N consumers.

PreviousNext