Description
Ideally suited for read-heavy workloads. One node (Leader) handles writes, others (Followers) replicate data and handle reads.
Where to use
- Databases (Postgres, MySQL).
Real World Example
Primary DB accepts writes, replicas serve read traffic.
Code Example
class Leader–Follower:
def __init__(self):
pass
def execute(self):
print('Executing Leader–Follower')
