Home

MicroServices and Kubernetes

Note: This post is a part of our series “Infobeans Innovation Day 2019.” You can learn about how it all started in our first post here.

While our first technology conference- Infobeans Innovation Day 2019 turned out to be amazing for all the attendees, we’d like you to be a part of it too. In case you missed the session, we’ve got you covered. With this post, we will share insights about MicroServices and Kubernetes represented by our team at the conference.

With the evolution of new technologies, the demand for application development is growing than ever before. Enterprises these days look for applications that are reliable at all times. To meet the demands of such enterprises developers are moving towards Microservices rather than using the traditional Monolithic architecture to develop enterprise-grade applications. Before going in deeper, let’s first understand the meaning of both these architectures.

Monolithic Architecture

The word monolith means something that is created or composed in one piece. Similarly, a monolithic architecture suggests a single-tiered application where all different components from a single platform can be combined and used for a single program. In this architecture, there can be different components and services but the application is created and deployed as a single application for all platforms.

Microservices Architecture

A more recent application development approach in recent times is MicroServices architecture. It is a development technique that uses multiple loosely coupled services and serves as an application. The protocols and services used in this architectures are lightweight and fine-grained. This architecture supports parallel development and allows small autonomous teams to develop different services independently.

While Monolithic architecture has served as a beneficial option for app development in the past, nowadays, people are moving to MicroServices. Let us understand the benefits of Microservices and Kubernetes in today’s time through a persona.

There’s a solution architect named Paul. He met with a client who honored him with a new project and wanted to propose project Architecture. The key requirements of the client for his project were as follows:

  • Big and Complex Enterprise level application
  • Different technologies and multiple platform support
  • Frequent development, testing, build and deployment cycles
  • High-performance and zero downtime
  • Scalable and secure solution

Once Paul was clear about the requirements, his major task was to figure out the type of architecture to be used for such an application- Should it be Monolithic or Microservice Architecture? While both the architectures have their own pros and cons, let’s go through their comparison once.

Monolithic vs Microservices

Monolithic architecture is similar to a big box containing multiple modules for an application while Microservices is a collection of several small boxes that perform different service functions independently for one application. At present, most of the applications follow the traditional monolithic architecture which is based on a technology stack and is deployed as a single package. Meaning that, if the monolithic application is down, the overall system will go down as well.

Since Paul had worked on the Monolithic applications in the past, he was aware of the challenges that occur while using monolithic architecture. Some of these challenges are:

  1. Block CI/CD: As all the systems are dependent on each other, it is difficult to implement CI/CD with monolithic applications
  2. Unscalable: Monolithic applications are not scalable in terms of handling large user bases
  3. Inflexible: Monolithic applications are developed using a single technology stack which is why users cannot create individual modules in different technologies. Thus, they are inflexible in nature
  4. Unreliable: Monolithic applications are unreliable. If any component fails, then the whole application will go down. There is no fault tolerance in Monolithic applications
  5. Slow Development: Due to dependencies on modules wait time is more in the monolithic applications, therefore, development activities are slow in pace in this architecture
  6. Large and Complex applications: In the long run, monolithic application complexity increases and eventually, it gets difficult to manage.

Once Paul had an understanding of all these possible challenges, he decided to take steps in a new direction. He explored Microservices and Kubernetes and in doing so, he came across their benefits. Finally, he decided to build the application through the MicroServices architecture and here’s how it went.

Paul created a Plug and Play Framework for developing the intended application. In this framework, he has used the Microservice architecture and Kubernetes to manage Microservices. He created 4 Microservices which are built using 4 different technologies that are PHP, Python, JAVA, and .NET.

There is a service discovery module embedded in the app which helps in discovering active and available services. Another module is the API gateway which works like a Firewall to filter the requests and make the application more secure. Using Kubernetes he also got a monitoring dashboard to monitor the Microservices and record log analysis for centralized troubleshooting and config manager to manage all services config from one place. Using this architecture, Paul has achieved the following benefits:

  1. Zero Downtime Deployment: With Microservices architecture, he was able to deploy modules with zero downtime.
  2. Auto Scaling: Kubernetes provides auto-scaling features. Meaning that, if there is load on the application, it auto scales as per the configurations set by the admin
  3. Support multiple technologies/languages: Microservices can be developed using different technologies. These technologies can communicate with each other using APIs
  4. Load balancing: Load balancing is a well-known feature and it is very easy to implement this using Microservices and Kubernetes. This feature provides a good interface and monitoring for it
  5. High Availability: Microservices and Kubernetes provide high availability of the system
  6. Container Orchestration: Microservices fully support Container Orchestration and Kubernetes provide a good interface to manage it
  7. Automated Scheduling: We can schedule automated deployments for frequent builds
  8. Fault Tolerance: This feature of Kubernetes help us in any disaster happens with the container, if one container/pod goes down it will automatically create new pod and make it available for the users
  9. Centralized Logging & Monitoring: Kubernetes provides Centralized Logging & Monitoring systems which help us to debug and monitor the issues and warnings
  10. Configuration Management: Centralized Config management helps in managing microservices at one place
  11. Automated Rollouts and rollback: It helps in deployments and rolling back the deployments in case of any problems in deployment

By using all these features of the MicroServices architecture, Paul was able to create an excellent application for his client.

Proof Of Concept

Further on, let us see the proof of concept created based on this framework by InfoBeans team at the conference. Our team created a POC based on the MicroServices architecture and the name of this application was- Guess Who. It is a mobile app which works on a Microservices Plug and Play framework.

Four different technologies have been used to create the MicroServices used by this application and each microservice has its own database which makes them independent. These microservices can talk to each other through APIs. Now we would like to give you a demo of Kubernetes and would like to share the benefits of Microservices using Kubernetes.

The application consists of a Kubernetes dashboard. Kubernetes is nothing but an open-source container orchestration tool which is used for managing containers. In our application, multiple MicroServices are built out of different containers. All these services are managed by Kubernetes. We have four applications and their respective pods. A pod is nothing but a collection of containers. With our app, we are able to achieve all the features mentioned above. Watch our demo presentation here:

The advantages of MicroServices architecture are convincing enough for enterprises to use them. There’s more security, high fault tolerance and ease of understanding while using these services.

Facebook Twitter Linkdin
Up ArrowBack to Blog

Cloud Migration Application

Alexa Voice Bot

iBean