1 / 11

Microservices Design Principles

Microservices design principles establish some standard practices for planning, developing, and implementing a distributed architecture for your application. Read about some of the most common characteristics of design principles, its examples, and implementations carried out by various companies worldwide.

Simform
Download Presentation

Microservices Design Principles

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Microservices Design Principles

  2. Revisiting the Old Hat of Design Principles In the early 2000s, Robert C Martin conceived the first five principles for Object-Oriented design, which would act as a guideline for implementing segregated business services. Later, Michael Feathers created the acronym SOLID, as we know it today. Single Responsibility Open/Closed Liskov Substitution Interface Segregation Dependency Inversion

  3. Single Concern or Responsibility The Ideal Microservices Design Principles Interface Segregation Loose Coupling Here are some of the ideal and best microservices design principles. You will find its implementation strategies, to set a guideline for best practices while designing a microservices architecture in the next slides. Autonomy Deployability Event-Driven Microservices

  4. Single Concern or Responsibility for Improved Task Distribution The single concern principle goes hand-in-hand with the microservices architecture style, which states that each deployment unit must contain one or a few highly cohesive services. This makes the microservices architecture easy to maintain and scale with evolving business requirements and a growing tech stack. Implementation: By employing the single responsibility principle, GojekTech got rid of the authentication token from their new internal chat services and added a separate database for the service, and established an asynchronous communication for quick channel creation. This improved their application availability and enabled strong data consistency. Eventually, their chat service – ‘Icebreaker’ – was doing the single function it was meant to in the first place.

  5. Dynamic Performance with Interface Segregation With different business domains, modules, and services segregated across the microservices architecture, there is often a mass of frontend (client programs) tied to one logic. The goal is to ensure that each type of frontend is attached to the service contracts that would best serve its requirements. Implementation: An API gateway is the best way to go around implementing the principle. The advantage of using an API gateway is that it can handle message format transformation, protocol bridging, message structure transformation, routing, and much more.

  6. Loose Coupling for Seamless Communication between Services Intercommunication and interaction between the service users and the services determine the functioning of a microservices architecture. Tightly coupled services always run at the risk of affecting the entire application, even if it’s a minor change or security issue like memory leaks and database connectivity issues. Implementation: The Alibaba Cloud Research and Development Teams utilized REST to make their overall program architecture loosely coupled. As a result, managing their microservice became easy and quick with uninterrupted and distributed services.

  7. Autonomy for Improved Scalability The essence of microservices architecture lies in its autonomy – service autonomy, engineer’s autonomy over services, and high availability for consumers. It dictates the parameters for scalability and enhances reliability for an extended period of time, even after services or business capabilities change. Implementation: Structure small organizational teams around one service (two pizza teams). Maintain a decentralized database with every service having its own data with no shared connections. Implement the circuit breaker pattern to make your service failure-proof.

  8. Discreet Deployability for Error-Free Services It is well-encapsulated and has a boundary that separates it from its environment. By this logic, it also means that all logic and data of a single service must be encapsulated in a single unit – deployed and managed independently. Implementation: Automate your deployment processes and employ CI/CD methodologies for a better time to market. Utilize containerization and container orchestration with platforms like Docker and Kubernetes. Employ service mesh for monitoring, authentication, circuit breaker, etc., to command over the communication services.

  9. A Robust Event-Driven Microservices Architecture In this architecture, event triggers are sent across the decoupled services for communicating with multiple services simultaneously. In addition, instead of using synchronous call, which often runs the risk of blocking a system process, asynchronous communication is utilized to keep the chain running. Implementation: Utilize REST along with EDA for better communication and transactions. Choose a messaging framework – Message processing, Stream processing, or a unique combination of both offered by Pulsar, NATS, Kafka, etc. Utilize CQRS to combat the issues of event sourcing.

  10. That's a wrap! The journey is all worth it when you have a guiding principle to help you construct the robust, efficient, secure, and reliable microservices architecture. It doesn’t matter if you are starting from scratch or in the process of transitioning, the principles aid engineers in making a fully conscious decision about their architecture or how to go about it.

  11. Contact Us Website www.simform.com Email Address contactus@simform.com Social Presence twitter.com/simform facebook.com/simform linkedin.com/company/simform/

More Related