DEV Community

campbelltech
campbelltech

Posted on

Microservices: Do It Right With These Principles

To ensure that microservices can FAIL INDEPENDENTLY, we need to follow these principles:

πŸ‘‰ Each microservice should only facilitate a single business domain or function.

πŸ‘‰ Microservices should not share code or data.

πŸ‘‰ If you have to, rather violate the DRY principle than compromise on independence.

πŸ‘‰ Microservices should not communicate directly with each other over HTTP. Instead, they should make use of a message/event bus (message queue or broker, e. g. Apache Kafka)

πŸ‘‰ Each microservice should, as far as possible, be unaware of the existence of other microservices.

Top comments (0)