Microservices Architecture for Scalable, Complex Systems

Microservices Architecture is an architectural style that structures an application as a suite of small and independent services that are running its own process to serve specific business capabilities. These services are developed and deployed independently. Recently, the Microservices Architecture pattern has been receiving a lot of attention and many big names in the industry like Amazon, Netflix, eBay and more have stated how the architecture has helped them scale and ease out delivery of their services.

To discuss about the advantages of the Microservices Architecture, one has to first talk about the traditional Monolith Architecture. In Monolith Architecture, even the biggest of applications with several tightly coupled modules is placed in a single executable and deployed on a single web or application server. The disadvantages of this architecture are:

  • Frequent updates or releases become more and more difficult as the size of the system grows owing to the complexity. Small releases require great amount of planning, as the entire system needs to be re-deployed.

  • Continuous delivery is affected in bigger systems where deployment times can be huge.

  • Greater project management overhead required for managing such big and complex projects.

  • Cost of scaling is very high

  • The choice of technology stack needs to be balanced to cater to all the requirements. Choice of specialized technologies for specific modules or components is not convenient.

  • Replacing existing components with ones with a better design or performance is really difficult.

  • Hard to practice agile development and delivery methodologies with Monolithic architecture.

  • Unreliable, as one unstable service can bring the whole application down.

In a Microservices Architecture application, the constituent components are standalone applications of their own. These independent application components talk to each other using RMI (Remote Method Invocation), Restful Web Services or Push Messaging. It is really important to identify the independent components correctly.

For sake of this discussion, let us consider we are developing an Employee Management System with various components like Employee Registration, Attendance, Salary etc. This application using Microservices Architecture will have independently deployed mini applications for Employee registration, attendance, salary and other modules. There could be scenarios data from various components is required for a single request. For this, we will have an API gateway or front controller, which will aggregate data from these components and send it back.

The following are the characteristics of a Microservices Architecture based application:

  • Application components running independently

  • Applications components may communicate with each other

  • The standards used for development and deployment could vary between components.

  • Data management in decentralized too, as each component can have its own data storage.

  • Automated infrastructure management solutions to be used for deployment of the individual components

  • The system should be developed in a way so as to gracefully handle failures in one or more of the components.

The Microservices Architecture pattern can really be used productively in a lot of scenarios. All the disadvantages listed above of the Monolithic Architecture become advantages in the Microservices Architecture. However, it is not without its own set of flaws. The following are some important disadvantages associated with using the Microservices Architecture:

  • Documents defining schemas and interfaces of each component need to be updated at all the times.

  • Each component could use a different technology or standard. The maintenance of such components could be higher.

  • Maintenance and support for a complex system with multiple independent components could be difficult and requires a team with high levels of expertise.

  • Initial cost of deployment could be higher as the number of resources running in parallel could be higher.

  • With components communication with each other, the security is something that needs to be considered very seriously as they will be more prone to security vulnerabilities.

  • Testing the components is more difficult

A decision on whether or not to go ahead with the Microservices Architecture is one that needs to be made after careful evaluation of your requirements. Several companies have moved to the Microservices Architecture and have benefitted immensely from it. There is no doubt; Microservices Architecture is definitely worth a consideration.

Share This Post: