O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Communication styles between microservices

Another important factor to be considered while designing microservices is the communication style between microservices. There can be a synchronous mode (sending requests, receiving responses) or an asynchronous mode of communication (fire and forget). Both modes have their own pros and cons and have their specific use cases where they can be used. In order to have a scalable microservice, a combination of both approaches is needed. Apart from this, nowadays "being real-time" is the new trend. Socket-based communication promotes real-time communication. Yet another way of dividing communication styles is based on the number of receivers. For a single receiver, we have a command-based pattern (CQRS, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required