Below are some notes on real-life learnings.
Designing the Microservices:
•Small services with CRUD operations on single business function or domain
•Use Lightweight REST based communication (client-to-service and service-to-service)
•Keep Loosely Coupled
•Ensure Services are Stateless
•Appropriate design patterns such as Aggregator, Proxy & Branch Patterns are commonly used
•In unavoidable cases - there will be Distributed Transactions and need to design for them
•Must design for Failure – e.g. Delays, Errors or Unavailability of another service or 3rd party system.
•Provide default functionality in case of failures from a service
•Rely on Input Validation - (client-to-service and service-to-service)
•Centralized Logging and Monitoring is a must across distributed microservices
•Use Testing tools for integration of services
•Quick feedback on check-ins and failures in the CI/CD pipeline
§Need clear deployment strategy at the start to identify which services will be deployed on which VMs