Insights from Our Experts
Why have big companies like Amazon and Netflix adopted Microservices?
Large corporations are frantically adopting the Microservices architecture (MSA) model. So what is the buzz all about?
Microservices architecture is one in which an application is developed into loosely coupled small separate services that speak to one another through intermediaries like APIs. Each Microservice is self-contained, maintains its own data store and can be updated independently of others. It is actually an evolution of SOA (Service-oriented architecture) which was quite popular some years back.
To understand Microservices, imagine an e-commerce application is being built that takes orders from customers, verifies inventory and available credit and ships them. The application consists of several components including the frontend which implements the user interface and backend services for checking credit, maintaining inventory and shipping orders. The application is deployed as a set of services.
Technologies as well as project processes and methodologies are evolving every day. The IT landscape moved to the cloud some time back; smaller and distributed services and network are but a logical progression of this new mantra. Monolithic structures are integral to corporations and any innovation happening cannot expect to radically upset the status quo. However the writing on the wall is clear about the direction the IT behemoths wants to go – it is the exciting world of Microservices models.
Several small services live in isolation in a shared environment in the Microservices world. Large applications are split into smaller ones. Services are interconnected by means of adapters. Each of these services is self-sufficient thereby creating the picture of a decentralized approach. Application development is made faster and deployment is easier. It can run on multiple servers with load balancing thereby making it easier to handle demand surges. Downtime due to hardware and software issues which is a bane of projects in many companies is drastically reduced.
Large companies are fast embracing this model for the simple reason that its advantages are many and apparent. Prominent among these are easier manageability, less complexity of application, modular nature, independent deployment and maintenance. It is scalable, reliable and resilient. Code base is smaller. Decoupling is possible between different parts of a code base. That makes it easy to update, replace, remove, or augment it. APIs are important when using Microservices as they are the gateway to the client applications. The API Gateway handles a request by invoking the various services and then combining the results.
Even the web application is split into smaller web applications. UI services invoke other services. Message based communication is also abundantly used. Software containers have created a standardized frame for all services. Containers encapsulate discrete components of application logic provisioned only with the minimal resources needed to do their job. Unlike virtual machines (VM), containers have no need for embedded operating systems; they make calls for OS resources via an API. Docker is a case in point of how developers around the world build and deploy applications with containers. Docker isolates containers to a particular process or service.
The benefits do not stop there. Microservices further score over old, monolithic architecture in that a service might be taken down for maintenance and can be easily replaced with another without any disturbance to the overall architecture. The show will go on. At the same time the reliance on API calls and other intermediaries mean that the easiness of calling using inbuilt procedure calls in monolithic models is absent. Creating umpteen numbers of small services can in itself breed complexity but that is the trade-off when you seek to implement as agile processes as possible in your projects. After all agile is about smaller work increments, frequent iterations and prototyping as a means of collaboration. Microservices is without doubt the way to go for evolving applications. It also brings about a level playing field. Developers and operations staffs need to get into one another’s shoes to put the Microservices model into practice.
Microservices perfectly align with the agile methodology of project management. Agile stresses on giving importance to individuals and interactions over processes and tools, working software over lengthy documentation, customer collaboration over contract negotiation and responding to change over following a set plan. In short agile is being adaptive and responsive to change, which is also the principle underlying Microservices. It is not surprising therefore, that giant corporations are wagering their money on this architecture of the future. The benefits far outweigh the costs. Many of the colossal failures of monolithic models in the past would have been avoided if such a de-risking was in place. It is never too late to change. Startup firms might not initially go in for Microservices due to reasons of economy but they need to plan for it futuristically.