Communication protocol across services
Microservices are independent fine-grained services that communicate with each other across process boundaries, hosted across the network, to address different business use cases. Choosing the right communication protocol is a very important factor to ensure reliable communication. The following aspects should be considered when assessing this factor:
- Are you following an API-first approach?
- Do you have deep chaining of services over synchronous communication protocols?
- Do you have asynchronous communication anywhere in the system?
- Which message broker technology are you using?
- What is the throughput of messages received or processed by the services?
- Do you have direct client-to-microservice communication?
- Do you need to persist messages?
- Are you using a materialized view pattern to address the chatty behavior of microservices?
- Have you implemented a retry pattern, a circuit breaker, exponential back-off...