top of page

Microservices distilled

My knowledge of microservices summarized :)


Microservices

  1. approach to software development

  2. microservices architecture consists of a collection of small, autonomous services.

  3. each service

    1. self-contained and should implement a single business capability.

    2. separate codebase - can be managed by a small development team.

    3. can be deployed independently.

    4. responsible for persisting their own data

    5. communicate with each other by using well-defined APIs.

    6. don't need to share the same technology stack, libraries, or frameworks.

  4. team can update an existing service without rebuilding and redeploying the entire application.


Management (Orchestration)

This component is responsible for placing services on nodes, identifying failures, rebalancing services across nodes, and so forth. Typically this component is an off-the-shelf technology such as Kubernetes.


Gateway

Entry point for clients. Instead of calling services directly, clients call the API gateway, which forwards the call to the appropriate services on the back end.

  1. decouples clients from services. Services can be versioned or refactored without needing to update all of the clients.

  2. can perform other cross-cutting functions such as authentication, logging, SSL termination, and load balancing.

Advantages

  1. Agility - microservices are deployed independently, it's easier to manage bug fixes and feature releases. You can update a service without redeploying the entire application

  2. Small, focused teams. A microservice should be small enough that a single feature team can build, test, and deploy it. Small team sizes promote greater agility.

  3. Small code base. In a monolithic application, there is a tendency over time for code dependencies to become tangled. Adding a new feature requires touching code in a lot of places. By not sharing code or data stores, a microservices architecture minimizes dependencies, and that makes it easier to add new features.

  4. Fault isolation. If an individual microservice becomes unavailable, it won't disrupt the entire application, as long as any upstream microservices are designed to handle faults correctly.

  5. Scalability. Services can be scaled independently, letting you scale out subsystems that require more resources, without scaling out the entire application.

  6. Data isolation. It is much easier to perform schema updates, because only a single microservice is affected.

Challenges

  1. Complexity. A microservices application has more moving parts than the equivalent monolithic application. Each service is simpler, but the entire system as a whole is more complex.

  2. Lack of governance. You may end up with so many different languages and frameworks that the application becomes hard to maintain. It may be useful to put some project-wide standards in place.

  3. Network congestion and latency. The use of many small, granular services can result in more interservice communication. Also, if the chain of service dependencies gets too long (service A calls B, which calls C...), the additional latency can become a problem.

  4. Data integrity. With each microservice responsible for its own data persistence. As a result, data consistency can be a challenge.

  5. Management. To be successful with microservices requires a mature DevOps culture.

  6. Versioning. Updates to a service must not break services that depend on it.

  7. Skill set. Evaluate whether the team has the skills and experience to be successful.










6 views0 comments

Recent Posts

See All
bottom of page