Kubernetes - Monolithic Architecture of Kubernetes
Last Updated : 30 Mar, 2023
There is a new way of developing software apps using a microservices architecture. That's when all the buzz around containers and container orchestration has increased but we have been developing and using these large software apps even before most of us were born. So in this article, we will be discussing what is that old software architecture we used even before microservices and what are the disadvantages of it that led to shifting our focus to microservices.
So coming to the primary objectives of this article, there are four major things that we'll discuss:
- What is Monolithic?
- What is monolithic architecture?
- Advantages and Disadvantages of Monolithic Architecture.
- Challenges of Monolithic architecture.
What is monolithic?
Monolithic in general is something that is a single large block, indivisible, inflexible, and moveable. So that briefly explains at a high level about monolithic architecture unity and its characteristics as well.
Monolithic application in IT is an application built based on monolithic architecture. It is self-contained which means it contains all parts of applications packaged and deployed together. So to simplify this you can imagine this like a big container where all software components of applications are assembled together and tightly packed and deployed as a single unit. Imagine that you have developed an application on the Java platform, then you can package them using various formats such as .jar accordingly and which is then finally deployed as a single unit onto the application server.
What is monolithic architecture?
So in business terms, you can say that all different business services are packaged together as a single unit which is tightly coupled so typically when you look at the monolithic architecture it primarily consists of three tiers.
High-Level Monolithic Architecture:
- Presentation layer: At a high level the presentation tier is the front-end layer of the three-tier architecture. It is primarily a user interface of a web application. This tier is often built with web technologies such as HTML, Javascript, CSS, or through other popular web development frameworks and this tier communicates with the other two tiers at the bottom using API calls.
- Application tier: This is where you have all the business logic. It is often written in Java, Dotnet, C, Python, C++, or some more related languages.
- Data-tier: This is where all the data is stored and this data is accessed by the application layer when API calls. This tier consists of database technologies such as MySQL, Oracle DB, Microsoft SQL Server, MongoDB
So that's a high-level overview of the monolithic architecture and its tiers. So all these layers are packaged and deployed together as one single unit and that is one of the main reasons why it is called monolithic architecture.
Now let's look at an example of a simple monolithic application. When you take a bookstore web app it primarily consists of four components they are:
- Customer accounts
- Payments
- Inventory
- Shipping
So if the developer develops this application based on a monolithic ID picture then all these four components will be developed together which may be interdependent on each other and deployed onto a web server as one single unit.
Advantages & Disadvantages of Monolithic Architecture
With this architecture style of developing an application, there are some advantages and there are disadvantages and now it's time to see some of the advantages and disadvantages of monolithic architecture.
Advantages of Monolithic Architecture:
- Single unit of deployment: Since it is a single unit of deployment so there is only one application to test and deploy overall. So monolithic applications are simple to develop and deploy.
- IDE support: We have been developing monolithic applications for almost two to three decades. It is mature and old so IDEs and other development tools are designed in sync with monolithic architecture in mind.
Disadvantages of Monolithic Architecture:
- Large Applications: Applications built with monolithic design are often very large. If the application is small then there are no problems. Then it will be easy to develop and maintain. In case if the application is large and has multiple components to it, then there will be a situation where the developer might get lost between business requirements, components, and its code. And most likely there is a scope for no single developer or even a group of developers to understand the entirety of the application, especially for those developers who have recently joined the team and it will take a lot of time to understand an application
- Technology Dependency: These monolithic applications will get locked in with initial decisions around the technologies that they have developed this application in. Even if there are better technologies and languages and tools that rise over a period of time to solve the business problems but unfortunately these monolithic applications will have to stick with their initial technologies and initial decisions that they have taken at the beginning.
- Single Stack Development: When developing software applications there is no one-size-fits-all principle here, meaning let's imagine that there are multiple components inside the application and there might be a situation where you feel that one technology is best suited to one component and is not suited to other components. However, this monolithic design will restrict you to use a single development stack across.
- Impractical Frequent Deployments: Frequent deployments are not practical because there are various application components linked together in a monolithic application as a result it requires coordination of many developers and even departments who are responsible for these components. It may take hours or even days to schedule deployment and test new features and bug fixes.
- Difficult to Scale: The scaling of monolithic applications can often be very challenging since this is deployed as a single unit of the app, not an individual component so had to scale the entire application.
Challenges of Monolithic Applications
Now there is one big challenge with monolithic architecture even though it has served well for over three decades. Large organizations have used this way of packaging and deploying applications for decades and have developed effective ways of dealing with these shortcomings, but this was before the internet brought new challenges and one of the challenges is the unpredictable nature of user demands on the application.
Imagine that you have an internal web application just inside your company and there are about 10,000 of your company employees using it every day. So you know exactly how many of your company employees you have when they are working and for how long. So based on these criteria you can provide just enough resources for these applications to perform best. So if more employees join the company you know this in advance and can add more resources to the server where this application is running to keep up with the best performance possible.
Now let's imagine that your company has an external website where they sell products online like amazon.com or walmart.com. In this scenario, you don't know exactly how many people will be using your website today. All you can make is a good estimation based on some historical data that you have but that cannot be certain. So if you look at the sales during the holiday season you see a rapid jump in visitors numbers as a result of some marketing campaign or a social media buzz. So as soon as you see that spike in traffic you need to immediately scale the application resources. Unfortunately, you do not have the luxury of a few weeks notice, so if you just fail to provide those resources it obviously reduces the performance of your applications which might even cause them to crash.
This used to happen during the early days of the Internet where web applications who are monolithic and when they were certain visitor numbers it would slow down the applications and possibly stop them altogether. The primary issue here is resources cannot be provided quickly enough to meet the demand. So the main disadvantage of the monolithic architecture pattern is it does not go well with scaling resources dynamically as and when needed.
Similar Reads
Kubernetes Tutorial Kubernetes is an open-source container management platform that automates the deployment, management, and scaling of container-based applications in different kinds of environments like physical, virtual, and cloud-native computing foundations. In this Kubernetes Tutorial, you are going to learn all
8 min read
Introduction to Kubernetes
Installation and Setup
Application Deployment
What are Kubernetes Containers?Kubernetes is an open-source container orchestration framework that was originally developed by Google. Container orchestration is automation. It can facilitate you to deploy the identical application across different environments like physical machines, virtual machines cloud environments, or perha
15 min read
Kubernetes - Introduction to Container OrchestrationIn this article, we will look into Container Orchestration in Kubernetes. But first, let's explore the trends that gave rise to containers, the need for container orchestration, and how that it has created the space for Kubernetes to rise to dominance and growth. The growth of technology into every
4 min read
Kubernetes - ImagesPre-requisite:- Kubernetes A container image is used to represent binary data that is being used to encapsulate an application and all its software dependencies. Container images can be represented as executable software bundles that run standalone and make very defined assumptions about their runti
3 min read
Kubernetes - JobsPre-requisite: Kubernetes In the Kubernetes world, jobs are considered an object to act as a supervisor or controllers of a task. The Kubernetes job will create a pod, monitor the task, and recreate another one if that pod fails for some reason. Upon completion of the task, it will terminate the pod
4 min read
Kubernetes - Labels & SelectorsAn open-source container management platform called Kubernetes automates the deployment, scaling, descaling, and load balancing of containers (also called a container orchestration tool). It was created by Google in Golang and has a sizable community as a result of that. Google eventually donated it
5 min read
Kubernetes - NamespacesKubernetes Namespace is a mechanism that enables you to organize resources. It is like a virtual cluster inside the cluster. A namespace isolates the resources from the resources of other namespaces. For example, You need to have different names for deployments/services in a namespace but you can ha
9 min read
Kubernetes - NodeKubernetes Nodes are the Worker or master machines where the actual work happens. Each Kubernetes node has the services required to execute Pods and is controlled by the Control Plane. Each Kubernetes Node can have multiple pods and pods have containers running inside them. 3 processes in every Node
13 min read
Kubernetes - NodePort ServiceNodePort service in Kubernetes is a service that is used to expose the application to the internet from where the end-users can access it. If you create a NodePort Service Kubernetes will assign the port within the range of (30000-32767). The application can be accessed by end-users using the node's
5 min read
Kubernetes - ClusterIP vs NodePort vs LoadBalancerThree main service types are used in Kubernetes networking: ClusterIP, NodePort, and LoadBalancer. Each has a specific function in controlling external access and service-to-service communication. Comprehending their distinctions is essential for efficiently coordinating applications. This article e
7 min read
Kubernetes - ServicesSoftware deployment, scaling, and management are all automated using Kubernetes, an open-source container orchestration system. K8s is another name for Kubernetes. Kubernetes was initially developed by Google and is now managed by the Cloud Native Computing Foundation. Despite the fact that it now s
3 min read
Kubernetes Pods: How to Create and Manage ThemKubernetes is an open-source container orchestration system mainly used for automated software deployment, management, and scaling. Kubernetes is also known as K8s. Kubernetes was originally developed by Google, but it is now being maintained by the Cloud Native Computing Foundation. It was original
13 min read
How to Run Shell Commands in Kubernetes Pods or ContainersIn Kubernetes, we create pods by adding an extra layer of information on containers. This Kubernetes in short is known as K8s, an open-source container orchestration tool developed by Google. It is used to orchestrate the containers for bringing Agility in software deployment through scaling, and ma
6 min read
Kubernetes - Creating Multiple Container in a PodPre-requisite:- Kubernetes Kubernetes is a container management tool and it automates container deployment, load balancing, and container scaling. It is open-source and developed by Google in 2014 and written in Golang. All cloud providers adopt Kubernetes. It is scheduled runs and manages isolated
3 min read
Kubernetes - Replication ControllerWith the help of the open-source container orchestration technology Kubernetes, software deployment, scalability, and management are mostly automated. Another name for Kubernetes is K8s. Google created Kubernetes, which is now overseen by the Cloud Native Computing Foundation. Even though it now wor
7 min read
Kuberneters - Difference Between Replicaset and Replication ControllerPre-requisite: Kubernetes Kubernetes is also known as K8s is an open-source container orchestration tool developed by google which is used for automating software deployment, scaling, and management. Currently, it is being maintained by the cloud native computing foundation(CNCF). K8s has two versio
4 min read
What is Kubernetes Deployment?Kubernetes is an open-source Container Management tool that automates container deployment, container scaling, descaling, and container load balancing (also called as container orchestration tool). It is written in Golang and has a huge community because it was first developed by Google and later do
10 min read
Configmaps
Kubernetes - ConfigMapsKubernetes allows you to run and manage applications in containers. However, when you need to update configurations like usernames, passwords, or URLs without modifying the application code, ConfigMaps provide an efficient solution. ConfigMaps separate application configuration from the application
10 min read
Kubernetes - Create Config Map From FilesPre-requisite: Kubernetes While creating a manifest file in Kubernetes, we can define environment variables. However, when you have a lot of manifest files, it will become difficult to manage the environment data stored in various manifest files. To overcome this issue, we can manage environment dat
3 min read
Kubernetes - Create ConfigMap From YAML FileA ConfigMap is a dictionary consisting of non-confidential data. Its primary role is to keep the configuration separate from the container image. ConfigMap can be created in different ways. This article will cover the declarative approach to creating ConfigMap from the YAML file. Example: apiVersion
1 min read
Kubernetes - Config Map From DirectoryPre-requisite:- Kubernetes Software deployment, scalability, and administration are mostly automated using Kubernetes, an open-source container orchestration framework. K8s is another name for Kubernetes. Kubernetes was initially developed by Google and is now managed by the Cloud Native Computing F
2 min read
Kubernetes - Injecting ConfigMap as FilesPre-requisite:- Kubernetes The automated deployment, scaling, and administration of software using a system called Kubernetes, an open-source container orchestration tool. K8s is another name for Kubernetes. Kubernetes was initially developed by Google and is now managed by the Cloud Native Computin
3 min read
Kubernetes - Injecting ConfigMap in PodsPre-requisite: Kubernetes Leveraging the open-source container orchestration engine Kubernetes to automate the deployment, scalability, and management of applications. Another name for Kubernetes is K8s. Google originally created Kubernetes, which is currently overseen by the Cloud Native Computing
3 min read
Scaling and Updating Applications
Kubernetes - Service DNS An open-source container orchestration system called Kubernetes is primarily employed for the automated deployment, scaling, and management of software. Another name for Kubernetes is K8s. Initially created by Google, Kubernetes is currently maintained by the Cloud Native Computing Foundation. Altho
11 min read
Additional Topics
What is Kubernetes API ?Complete GuideKubernetes API is an application that serves Kubernetes functionality through a RESTful interface and stores the state of the cluster via HTTP. Users can directly interact with the Kubernetes API or via tools like kubectl. It supports retrieving, creating, updating, and deleting primary resources vi
14 min read
Kubernetes - Taint and TolerationA pod is a group of one or more containers and is the smallest deployable unit in Kubernetes. A node is a representation of a single machine in a cluster (we can simply view these machines as a set of CPU and RAM). A node can be a virtual machine, a physical machine in a data center hosted on a clou
6 min read
Kubernetes Resource Model (KRM) and How to Make Use of YAML?Here we will explain how YAML can simplify system management and automation of most processes so that Kubernetes is a convenient working system. Basic Kubernetes Models: KRM and Everything-as-CodeAccording to Kubernetes co-founder Brian Grant, Kubernetes is very convenient thanks to the Kubernetes R
6 min read
Installing Private Git Server on K8s Cluster with Gitea and AKSIn this article, we are going to install a self-hosted Gitea server on top of Azure Kubernetes Service with Helm and set up a git repo. Having a private Git server might be beneficial these days. Gitea is a community-managed Git-compatible lightweight code hosting solution written in Go. It is publi
4 min read
Enable Remote Debugging For Java Application Deployed in Kubernetes EnvironmentDuring Development, developers have to debug their applications to resolve code problems. In order to debug a java application which is deployed on remote machine in a Kubernetes cluster, first developer has to do some steps to enable its application ready for debugging. Below are the manual steps t
2 min read
How to Enable JMX For Java Application Running in the Kubernetes Cluster?Many times we want to monitor our application's CPU utilization, background thread behavior, and most importantly memory consumptions for tasks that deal with loads for data (500MB - 1GB) or much more data. Such monitoring helps to find which operation is causing heavy CPU or Memory utilization and
3 min read