Ifyou are new to microservices I suggest you go through my previous article to get to know some must-know concepts about microservices.

So, if you are good with microservices be prepared to learn about common mistakes and best practices for microservices.

  1. Design.
  2. Hardcoded values.
  3. Logging.
  4. Versioning.
  5. Authorization and authentication mechanism.
  6. Dependency.
  7. Make executable contracts.
  8. Fault tolerance.
  9. Documentation.

Design

Source:  https://martinfowler.com/

🌟 Design should be domain-driven design (DDD).

🌟 Think of an e-commerce application with built-in microservice architecture. This e-commerce application has several services like customer service, shipping service, order handling service.

🌟 The customer could appear in both customer service and shipping service but two different aspects. In customer service, there is customer registration, profile management (a customer creation part).

🌟 But in the shipping module customer could be represented in a different aspect. But the main scope of the shipping service should be delivering products to customers.

🌟 So basically, when you design a system or think of migrating to microservices, make sure you have a fresh domain driven design.

🌟 Let me explain another mistake some people do when they want to be on microservices so badly just because it’s trending and popular.

🌟 Assume an e-commerce application has the below services,

  • customer service.
  • shipping service.
  • order handling service.
  • Seller Service.
  • Inventory service.

#microservices #software-engineering

Best Practices for Microservices
1.65 GEEK