The network interaction through which independently deployed microservices exchange information and coordinate behavior.
Service communication lets independently deployed microservices collaborate to deliver features that no single service can provide alone. It coordinates activities through direct or indirect messages. section 5.0section 5.3
Choose the communication style according to the coordination the application needs:
Use direct, synchronous messaging when the sender must explicitly sequence work or orchestrate another service, and when immediate success or failure matters. HTTP POST requests support this style. section 5.11
Use indirect, asynchronous messaging to decouple services and broadcast important events across the application. RabbitMQ provides message queuing for this style. section 5.11
Treat communication as an operational concern: growing service fleets require appropriate skills, automation, and tooling to remain manageable. section 1.10.3
Video application
A video-streaming service communicates with video-storage, then a history service is added to receive a stream of messages. HTTP can coordinate a required action directly; RabbitMQ can notify other services indirectly about an event. section 5.3section 5.11
Figure 5.2 In this chapter, we expand our application with a new microservice and explore methods of communication between our microservices.
Use the system diagram to see how adding a history microservice expands the communicating application. section 5.3
How Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform covers it
How deep it goes
Explains direct and indirect messaging with HTTP and RabbitMQ, but defers improved service-readiness handling to later treatment.
Examples
Uses video-streaming, video-storage, and history microservices to demonstrate direct requests and streams of messages.
What it assumes
Assumes a working microservices application and introduces communication techniques needed for services to collaborate.
What you can do after
Evaluate whether HTTP or RabbitMQ better fits a coordination or decoupling requirement.
How it connects
Connects microservices with HTTP, RabbitMQ, synchronous messaging, asynchronous messaging, Docker Compose, and live reload.
Platform Engineering on KubernetesA service-to-service interaction is communication in which one independently deployable service requests or sends data to another service.
microservice architectureused by · Microservice architecture is a software architectural style that organizes an application as independently deployable services with focused responsibilities that communicate through defined interfaces.
direct messaginghas part · Direct messaging is synchronous communication in which one microservice sends a message directly to a specifically addressed other microservice and receives an immediate handling result.
Apache Kafkaused by · Apache Kafka is a distributed event-streaming platform for publishing, storing, processing, and consuming streams of records.
network traffickind of · Network traffic is the flow or volume of data, including packets and requests, exchanged across a computer network over time.
request-response APIused by · A request-response API is an interaction pattern in which a requester sends a request to a provider and receives a corresponding response.
HTTPuses · HTTP is a standardized application-layer protocol that defines request-and-response messages for transferring resource representations between networked systems.
This explainer was generated by Manning's knowledge graph from the text of Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform. The section links point to the parts of the book it draws on.