Smart Endpoints and Dumb Pipes
Seenivasa Ramadurai
Posted on August 29, 2024
Transitioning from Monolithic to Microservices
When decomposing a large monolithic application into microservices, the level of integration complexity remains the same. In a monolithic application, a centralized integration layer—often an Enterprise Service Bus (ESB)—is used. The ESB connects or integrates with all downstream and upstream applications or systems, supporting routing, orchestration, and business logic. This centralized approach is referred to as "smart pipes."
However, in a microservices architecture, services are designed as "smart endpoints" and "dumb pipes." Each microservice communicates directly with other services, SaaS applications, or other systems without a centralized integration layer. This communication is often supported by message brokers like Azure EventHub or queues, and services are typically connected via HTTP (REST) or simple messaging protocols.
In this architecture, the integration logic is dispersed across multiple microservices. For example, the Engagement and Raid microservices not only implement business logic but also integrate with external systems like JIRA. This approach decentralizes the integration, making each microservice a smart endpoint that handles its own business logic and external integrations.
While microservices architecture distributes the integration logic across services, it does not eliminate the complexity of integration. Instead, it spreads the responsibility to multiple services.
Managing Microservices Communication
Microservices communication adds complexity, particularly for inter-service communications. To address these challenges, a service mesh such as ISTIO can be used. ISTIO employs a sidecar pattern to manage:
- Service Discovery: Automatically finds and connects services.
- mTLS (Mutual Transport Layer Security): Secures communication between services.
- Resiliency: Provides fault tolerance and load balancing.
- Service-to-Service Communication: Manages the communication between services, offloading these responsibilities from the application code.
By using ISTIO, the complexities of service communication, security, and resiliency are offloaded from individual microservices, allowing developers to focus on business logic rather than infrastructure concerns.
Summary
Microservices architecture decentralizes integration logic, distributing it across multiple services. While this approach offers benefits like scalability and maintainability, it introduces complexity in service communication. Tools like ISTIO help manage this complexity, providing features like service discovery, security, and communication management, thereby enabling more efficient and secure service interactions.
Thanks
Sreeni Ramadurai
Posted on August 29, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 30, 2024