AdSense Banner (728x90)
1.1 Overview of Distributed Systems
Understanding distributed systems vs monolithic architecture and communication patterns.
Overview of Distributed Systems
Monolithic Systems
- Large, single codebase bundling all functionality together
- Simple deployment but difficult to maintain and scale
- All components interconnected within one system
- Changes to one part can impact the entire application
- Lack of modularity makes maintenance increasingly difficult as application grows
Distributed Systems
- Split large systems into smaller, independent modules
- Each module developed and maintained individually
- Modular design encourages ownership and reduces impact of changes
- Better scalability and simplified maintenance
- Modules communicate with each other to perform tasks
Real-World Example: Customer Order Processing
When a customer places an order:
- Order Service receives the request
- Warehouse module handles dispatch
- Email Service sends order confirmation
- Each service operates independently while collaborating
Communication Methods
Direct Communication
- Services connect directly using IP addresses
- Simple but creates tight coupling between services
- Fragile: breaks if IP changes or service goes down
- Example: Order Service → Warehouse (10.1.1.1), Email Service (10.1.1.2)
Messaging System Communication
- Services communicate through a messaging platform
- Decouples services for independent operation
- Messaging system handles routing and queuing
- Messages queued if service temporarily unavailable
- Enhanced resilience and scalability
- Services can be added/removed without breaking communication