Enterprises using monolithic systems to support large applications find it increasingly difficult to respond to evolving business priorities and rising customer expectations. Each functionality is built together as one single block, and it’s almost impossible to change or update a portion of it, without overhauling the complete monolith. Due to this, enterprises are rapidly exploring the advantages of microservices.

Let’s take a closer look

 

What is a Microservices Architecture?

The microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralised management of these services, which may be written in different programming languages and use different data storage technologies.

 

Microservices vs Monolith

  1. With monolithic architectures, all processes are tightly coupled and run as a single service. This means that if one process of the application experiences a spike in demand, the entire architecture must be scaled. Adding or improving a monolithic application’s features becomes more complex as the code base grows. This complexity limits experimentation and makes it difficult to implement new ideas. Monolithic architectures add risk for application availability because many dependent and tightly coupled processes increase the impact of a single process failure.
  2. With a microservices architecture, an application is built as independent components that run each application process as a service. These services communicate via a well-defined interface using lightweight APIs. Services are built for business capabilities and each service performs a single function. Because they are independently run, each service can be updated, deployed, and scaled to meet demand for specific functions of an application.

 

What are the advantages associated with microservices?

  1. Strong Module Boundaries: Microservices reinforce modular architecture, which is much needed for larger teams.
  2. Independent Deployment: Simple services are easier to deploy and since they are autonomous, they are less likely to cause failures when they go wrong.
  3. Technology Deployment: With microservices you can mix multiple languages, development frameworks and data storage technologies.
  4. Reusable Code: Microservices are individually deployed which makes it easier to connect a microservice with other applications as well.

 

What are the disadvantages?

  1. Complexity: Microservices follow the concept of distributed systems, hence, they offer all the complexities of distributed systems. Managing microservices is a critical task.
  2. There is a higher possibility of system failure due to communication between different microservices.
  3. Regression analysis and testing are difficult tasks in microservices.
  4. Developer needs to cater load balancing and network latency.
  5. Debugging issues in a microservice architecture is a hectic challenge, as each service has its own set of logs. So due to multiple services a developer may face difficulty to identify the log track.

However, you be happy to know that these drawbacks can be addressed well, if you make use of the right set of tools and services

 

Automated Deployment of Microservices:

  1. Error Handling Mechanisms: When we want to automate the process of deployment of microservices we need to ensure that our code is using proper error handling techniques.
  2. Unit Testing: Proper unit testing should be done at application level for each functionality and feature. Developers should write individual test cases for each functional component. Developers can also set the threshold limit for the code coverage which the code should follow for passing the Unit Tests in deployment process.
  3. CI/CD Integration: Use of CI/CD tools is a must when it comes to DevOps Engineering. Testing tools like; Jenkins, CircleCI can be used for CI/CD.
  4. Automated Build of Docker/Kubernetes Containers: With integration of CI/CD pipelines, these tools also manage the automatic build of containers for setting up code on container images.

 

Project Case Study

One of our clients from Neo Banking Domain, explained the need to use Microservice Architecture in their Project. Client demanded all the functionality of the application to be organized separately and the solution to be scalable and robust. This was required to ensure that in case infrastructural or business changes were implemented in one service, other services would not be affected.

Hence, the solution was nothing, but, Microservices!

The project’s core services were organised into different micro services:

  1. Financial Service: responsible for addressing all communications related to Payment Client.
  2. Account Service: responsible for keeping all customer’s data.
  3. Card Services: responsible for providing various digital and virtual card services.
  4. Statistics Services: responsible for providing all statistical information related to a customer’s account like Net Debited/Credited Amount, Category Wise Spend, Balance etc.

All these services were organized into an individual microservice. These were orchestrated using AWS Step Functions inside Kubernetes clusters.

With growing demand for Microservices, developers are moving towards different Managed AWS Microservices like AWS Stepfunctions, AWS Simple Workflows(SWF).

We will be discussing AWS Stepfunctions and AWS Simple Workflows in our next blog. Stay tuned!

 

References:

https://martinfowler.com/microservices/https://docs.aws.amazon.com/whitepapers/latest/microservices-on-aws/microservices-on-aws.html

Leave a Reply

Your email address will not be published. Required fields are marked *