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

Service interactions

The next level is communication among microservices. When microservices communicate among themselves, a checklist should be followed. This checklist helps to ensure that if any service fails, then the failure is contained and it doesn't spread through the entire system:

  • Data should be transported in a serialized format, such as JSON or protobuf
  • Error codes should be used carefully and actions should be taken accordingly on them.
  • APIs should be simple, effective, and the contract should be clear
  • A service discovery mechanism should be implemented to find other services easily
  • Decentralized interactions over centralized orchestrators should be preferred
  • APIs should be versioned
  • Circuit breakers help to stop the error propagating ...

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