Bird
0
0
LLDsystem_design~12 mins

Mediator pattern in LLD - Architecture Diagram

Choose your learning style9 modes available
System Overview - Mediator pattern

The Mediator pattern helps different parts of a system talk to each other without knowing the details of each other. It acts like a central hub that manages communication between components, making the system easier to manage and change.

Architecture Diagram
          +----------------+
          |   Component A  |
          +-------+--------+
                  |
                  v
          +----------------+
          |    Mediator    |
          +-------+--------+
                  |
                  v
          +-------+--------+
          |   Component B  |
          +----------------+
Components
Component A
component
Sends requests and receives responses via the Mediator
Component B
component
Sends requests and receives responses via the Mediator
Mediator
mediator
Central hub that manages communication between components
Request Flow - 4 Hops
Component AMediator
MediatorComponent B
Component BMediator
MediatorComponent A
Failure Scenario
Component Fails:Mediator
Impact:All communication between components stops, components cannot coordinate or exchange messages.
Mitigation:Implement mediator redundancy or fallback mediator instances to ensure availability.
Architecture Quiz - 3 Questions
Test your understanding
What is the main role of the Mediator in this pattern?
ATo store data permanently
BTo manage communication between components centrally
CTo replace all components
DTo act as a database
Design Principle
The Mediator pattern centralizes communication, reducing direct dependencies between components. This makes the system easier to maintain and extend by isolating component interactions through a single mediator.