In the The enterprise software landscape a new trend is emerging that is changing the way enterprises work. This trend isadoption of ‘Microservices’.
According to a recent survey from Nginx (leaders in load balancing and containerisation) , 36 percent of enterprises surveyed are currently using microservices, with another 26 percent in the research phase. Agilityand scalability, are the top motivators for microservice adoption.
Walmart Canada, refactored its software architecture to microservices in 2012. It wasn’t able to handle the 6 million page views per minute that time, achieved significant increase in its conversion rate.Downtime was minimized, too, and the company was able to replace expensive commodity hardware with cheaper virtual x86 servers, resulting in an overall cost savings between 20 and 50 percent.
"Get TCO curve down"
With microservices, multiple teams work on independent services, enabling you to deploy quickly. Development time is reduced, and code will be more reusable. By decoupling services,Basic x86 machines can be used instead of expensive machines. This way Microservices reduces infrastructure costs as well asit minimizes downtime
But what exactly is microservices :
Microservices is defined as a granular software architecture where app components are designed and evolved independently to meet API-defined interoperability requirements. Containerspopularized by the open-source Dockers are excellent tool for enterprises to enable microservices.IDC data shows that for IT organizations using containers, 85% are using containers for production applications.
Containers support full-stack deployments so that developer teams can work on the loosely coupled applications and then choose the technology stack best suited for their deployment requirements rather than the reverse.
What is Container:
A container consists of an entire runtime environment: an application, plus all its dependencies, libraries and other binaries, and configuration files needed to run it, bundled into one package.
Containers are generally compared with virtual machines (VMs). Virtual machines and containers both enable user to package application with libraries and other dependencies.But, the containers are far more lightweight unit as compared to VMs.
Difference in running a VM vs Container:
By containerizing the application platform and its dependencies, differences in OS distributions and underlying infrastructure are abstracted away. Containers virtualize at the operating system level whereas virtual machines virtualize the hardware stack. Multiple containers running atop the OS kernel share the OS kernel, use a fraction of the memory compared to booting an entire OS.
In addition to various technical advantages, Containers help in incuringlesser cost too.
TCO (Total cost of ownership) - Factor:
Recently done research on TCO have placed containers way - ahead in achieving lower TCO than VMs and obviously Physical Systems /servers.
Current Datacenter costs are inclining more towards spending on Power (Watt per Hour) / PUE than the cost on real - estate and other factors.At times in proportion of 70% power vs 30% on other operational / capex costs.
There are many container formats available. Docker is a popular,open-source container format that is supported by Kubernetes Engine.
Docker is the leading container technology which runs of LXC (Linux Containers) model. Docker acts an abstraction layer to package to application and its dependencies regardless of the environment of the system.
Efficiency: Application development is quick, brings in agile methodology.
Portabilty: Applications can be easily packaged and same application can run in Cloud, In – Premise with ease.
Build – Run – Destroy: It gives control to deploy applications in fractions of seconds, do its intended job and then gets terminated bring down the overall resource utilisation which yields better TCO (Total Cost of Ownership).
Docker is free and open source:
The core Docker code is free to use for everyone. Don't need to pay anything If you want to set up and maintain Docker environment.Some virtual machine platforms are free, such as KVM, others, like VMware, cost a lot of money to use at large scale.
Docker uses resources efficiently :
More apps can be run with less number of servers using Docker. Because Docker environment does not waste system resources duplicating operating-system functions unlike virtual machines.
Docker makes it easier to pay only for what you use:
Dockerized environments can be scaled up easily as per thechanges in demand for an app. This gives a huge cost advantage.If Docker environment is hosted in the cloud and your billing plan can be configuredso that you pay only for the resources you consume. Instead of maintaining an infrastructure which consists of virtual servers, you can use containers to build a cloud environment in which your expenses scale up and downbasis service requirements.
Kubernetes has come up really fast as the de-facto open-source container management / orchestration tool. It is very light weight and portable. It gives flexibility to run same platform and containers images across all platforms viz, private cloud, public cloud, on – premise off – premise. Its battery of tools made ground – up takes care of most of the IT – issues and provides robustness, scalability and of ease of operations.
You can not only use Kubernete to build new, cloud-native microservice applications, but also can migrate existing applications into containers and run them in Kubernetes.
Kubernetes makes it very easy to run many containers on the same hosts, making maximum use of the available resources. So the number of required servers is lesser, which in turn saves your money.
In a nutshell container-based microservices applications in production environments can better respond to unpredictable workloads. For companies shorter container initiation times can help to improve the financial performance of revenue-generating applications.