II. Communication Protocols & API Design
Once logic spans multiple services, how they talk becomes an architectural decision with consequences in latency, coupling, and failure behavior. The choice is never just “REST or gRPC”: it is synchronous request-response versus asynchronous messaging, strict contracts versus schema evolution, and where in the path you place the gateway and load balancer that every request must survive. This part covers the wire-level mechanics and the failure semantics of each option — above all, the fact that a timeout tells you nothing about whether your request actually executed.
Topics Covered
Section titled “Topics Covered”- 2.1. Synchronous Communication Protocols: Request-response protocols from the wire up: REST, HTTP/2 and HTTP/3, gRPC, GraphQL, and the cross-cutting concerns they share.
- 2.2. Asynchronous Messaging Fundamentals: Decoupling producers from consumers with queues and logs: delivery semantics, ordering, schema evolution, and dead-letter handling.
- 2.3. API Gateway and Service Contracts: The single entry point for external traffic: routing, authentication, contract-first development, and idempotency guarantees.
- 2.4. Load Balancing: Distributing requests across instances: L4 versus L7, balancing algorithms, and health-aware routing that pulls failing nodes.