Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Building Microservices the right way

Building Microservices the right way

Avatar for nwachukwu chibuike

nwachukwu chibuike

March 13, 2023
Tweet

More Decks by nwachukwu chibuike

Other Decks in Technology

Transcript

  1. About me Software Engineer at Payrix, Technical Writer and AWS

    Community Builder (2x AWS Certified) - Chibuike Nwachukwu
  2. What are Microservices? It is an architectural pattern that structures

    an application as a collection of services Microservices are self contained and independent
  3. Building Microservices the right way • Domain-Driven Design • Resource

    Separation • Asynchronous Communication • Detailed Documentation
  4. The golden rule: can you make a change to a

    service and deploy it by itself without changing anything else? ― Sam Newman, Building Microservices: Designing Fine-Grained Systems
  5. Domain-Driven Design Here each microservice is designed around the business

    needs, each focuses on a particular business need and builds around it. Here the concept of Single responsibility comes to play where each microservice is tasked with carrying out a “single” responsibility in the system. Serverless/Functional architecture shares concept with this since it also encourages a function/service doing a singular thing.
  6. Benefits of Domain-Driven Design • Standard Communication: Communication between developers

    and teams becomes much easier. Ubiquitous language is likely to contain simpler terms developers refer to, no need for complicated technical terms. • More flexibility: Thanks to this, the entire system can be modified and improved regularly. • Better product: Engineers understand business domains well.
  7. Resource Separation A Microservice should be completely contained, containing all

    the resources it needs to work. Separating both human and technological resources like storage, database, repository, deployment tools having them dedicated to each microservice
  8. Benefits of Resource Separation To Engineers • Increases agility •

    Improves productivity • Increases skill-set • Increases product knowledge • More accountability To application • Increases resilience • Improves security • Better management and governance • Removes interdependency • Improves performance
  9. Asynchronous Communication This is a non-blocking protocol that follows event-driven

    architecture. It allows parallel execution of requests and provides better resilience. Synchronous interactions: Dominates the closer you get to a user (like with a website) Asynchronous Interactions: Should become the rule if there is any work that can be deferred, when interaction is between the services
  10. Benefits of Asynchronous Communication To users • Saves time •

    Improves User Experience • Increase in site usage To application • Faster applications • Better performance • Saves Cost
  11. Detailed Documentation Everything should be written down imagining the author

    won’t be available ever again. Increased demand for performance and dynamic approach requires advanced monitoring This also helps track the flow of events within the architecture easily using RFC, Open APi Spec, Documentation, Readme
  12. Benefits of Detailed Documentation • Acts as a source of

    Truth • Cultivates a Good Work Culture • Frees up Human Resource. • Helps Onboard Engineers faster • Makes Team Agile as they own their own systems
  13. Wrap Up • We learnt about Microservices and its Benefits

    • We discussed best practices to use when building such
  14. Additional Resource • EBook - Microservices Patterns by Chris Richardson

    • Website - NetFlix Engineering Blog • Community- Aws UG, AWS Community Builders, etc • E-learning courses - InterviewReady