Docker & Kubernetes Load Balancer
Docker & Kubernetes Load Balancer
Acknowledgement
I am genuinely moved, and I would want to offer my heartfelt gratitude to the individuals
and institutions that have contributed significantly to the success of my initiative. First and
foremost, I want to thank Suraj Neupane, who has been more than simply an external
supervisor to me; he is like a brother to me. His unwavering support, guidance, and
mentorship have been immeasurable. He has gone above and beyond in providing
feedback, reviewing my work, and encouraging me to do my best. His commitment,
patience, and support have been vital in the success of my project, and I am very grateful
to have him on my side. I am also grateful to my parents for their constant support and
providing of essential resources. Their faith in my ability, consistent support, and
readiness to supply me with the resources I needed to complete my project have all
served as sources of inspiration for me. Their sacrifices, encouragement, and steadfast
love have served as a beacon of light throughout my project's journey, and I will be
eternally grateful for their presence in my life.I would want to thank Stuti Bhatta, my
closest female friend, for her unselfish kindness in lending Raspberry Pis for my initiative.
Her encouragement and support have been vital, and her conviction in my ability has
been a driving force in my determination to perform at work. Her steadfast encouragement
and friendship have meant everything to me, and I am grateful for her participation to my
endeavor. My brother, Prabesh Shankhadev, deserves mention for becoming my client
and approving my project with his organization. His faith in my ability and constant support
have been critical to the success of my enterprise. His words of encouragement, critique,
and belief in my abilities have inspired me to put out my best effort in my work, and I am
appreciative for his presence on my project path.I would also want to thank Manish
Shrestha for his support in locating appropriate materials for my project. His advice,
encouragement, and readiness to share his knowledge and skills were helpful in
developing and improving the quality of my project. His persistent support and
commitment to my success have been invaluable, and I am appreciative for his
contributions to my project. Finally, I'd want to thank Network Chuck for consistently
offering useful expertise and thoughts in the realm of technology. His enthusiasm for
study and commitment to spreading information have served as sources of inspiration for
me over the course of my endeavor. His contributions to my study and advancement in
the realm of technology have been enormous, and I am grateful for his ongoing
assistance. Furthermore, I would want to convey my gratitude to Islington College for
giving me the opportunity to work on this project. The curriculum, guidance, and resources
of the institution have all played an important role in molding my abilities and knowledge,
as well as providing me with a platform to pursue my passion for technology. Islington
College's faculty and staff have been crucial in my academic and personal development,
and I am grateful for the education and experiences I have obtained here.
Finally, I would want to express my heartfelt gratitude to Suraj Neupane, my parents, Stuti
Bhatta, Prabesh Shankhadev, Manish Shrestha, Network Chuck, and Islington College
for their constant support, mentorship, and contributions to my project path. Their faith in
my ability, encouragement, and generosity have all contributed to my success, and I will
be eternally grateful for their presence in my life. Their help has gone beyond anything I
could have hoped for, and I consider myself genuinely privileged to have them by my side
throughout this project's journey.
Table of Contents
Acknowledgement ....................................................................................................2
Table of figures.........................................................................................................8
Table of tables ........................................................................................................ 11
Abstract ................................................................................................................. 12
1 Introduction ......................................................................................................... 14
1.1 Project description ......................................................................................... 14
1.2 Current Scenario............................................................................................ 16
1.3 Problem Domain and Project as a Solution ...................................................... 17
1.3.1 Problem Statement .................................................................................. 17
1.3.2 The Project as a solution .......................................................................... 18
1.4 Aims and Objectives ...................................................................................... 20
1.4.1 Aim ......................................................................................................... 20
1.4.2 Objectives ............................................................................................... 20
1.6 Structure of The Report .................................................................................. 20
1.6.1 Background ............................................................................................. 20
1.6.2 Development ........................................................................................... 21
1.6.3 Testing and Analysis ................................................................................ 21
1.6.4 Conclusion .............................................................................................. 21
2 Background ......................................................................................................... 22
2.1 About end users ............................................................................................ 23
2.1.1 Client’s name .......................................................................................... 23
2.1.2 Client’s description................................................................................... 23
2.2 Understanding the solution ............................................................................. 26
2.2.1 Containerization with Docker: ................................................................... 26
2.2.2 Orchestration with k3s: ............................................................................. 26
2.2.3 Load balancing with high-availability: ........................................................ 27
2.2.4 Resource efficient deployment: ................................................................. 28
2.2.5 Resilience with poor infrastructures: .......................................................... 28
2.3 Similar projects .............................................................................................. 29
2.3.1 Similar project 1....................................................................................... 29
Load Balancing using Docker and Kubernetes: A Comparative Study (Prajval
Mohan, 2020) .................................................................................................. 29
Table of figures
Figure 1: Server down when there is excessive traffic ............................................... 14
Figure 2: Load balancer use .................................................................................... 15
Figure 3: Docker users skyrocketing ........................................................................ 16
Figure 4: Nepal GDP according to growth in technology ............................................ 17
Figure 5: Client company logo ................................................................................. 24
Figure 6: Client approval letter ................................................................................. 25
Figure 7: Docker container ...................................................................................... 26
Figure 8: K3s architecture ....................................................................................... 27
Figure 9: Load balancer position .............................................................................. 28
Figure 10: Evolutionary prototyping model steps ....................................................... 35
Figure 11: Raspberry pi ......................................................................................... 115
Figure 12: SD card................................................................................................ 115
Figure 13: SD card reader ..................................................................................... 116
Figure 14: USB cable ............................................................................................ 116
Figure 15: Rj45 cable ............................................................................................ 116
Figure 16: Router.................................................................................................. 117
Figure 17: Use case diagram ................................................................................... 47
Figure 18: Use case diagram for kubernetes cluster only ........................................... 48
Figure 19: Installation procedure .............................................................................. 49
Figure 20: Installation procedure 2 ........................................................................... 50
Figure 21: User side flowchart ................................................................................. 51
Figure 22: load balancing ........................................................................................ 52
Figure 23: Cluster flowchart ..................................................................................... 53
Figure 24: Pulling Nginx image ................................................................................ 55
Figure 25: Image pulled........................................................................................... 56
Figure 26: Seeing logs of my image ......................................................................... 56
Figure 27: Inspecting the image ............................................................................... 57
Figure 28: Inspecting part 2 ..................................................................................... 58
Figure 29: Restarting docker.................................................................................... 58
Figure 30: new port and new image ......................................................................... 59
Figure 31: running pods .......................................................................................... 59
Figure 32: The website is working ............................................................................ 59
Figure 33: K3s installation ....................................................................................... 60
Figure 34: Cluster status ......................................................................................... 60
Figure 35: Server overview ...................................................................................... 60
Figure 36: Installation failure .................................................................................... 61
Figure 37: Trying to access ..................................................................................... 61
Figure 38: Port error................................................................................................ 62
Figure 39: Port already in use .................................................................................. 63
Figure 40: Image name already in use ..................................................................... 63
Figure 41 : Curl command to call API: ...................................................................... 67
Figure 42: Pt 2........................................................................................................ 67
Mijash Rajthala 10 | P a g e
CS6PO5 Final Year Project
Table of tables
Table 1: Comparison table....................................................................................... 32
Table 2: Unit test plan ............................................................................................. 66
Table 3: System testing ........................................................................................... 66
Table 4: Test case 1 ............................................................................................... 67
Table 5: Test case 2 ............................................................................................... 67
Table 6: Test case 3 ............................................................................................... 68
Table 7: Test case 4 ............................................................................................... 68
Table 8: Test case 5 ............................................................................................... 69
Table 9: Test case 6 ............................................................................................... 69
Table 10: Test case 7.............................................................................................. 70
Table 11: Test case 8.............................................................................................. 71
Table 12: Test case 9.............................................................................................. 71
Table 13: Test case 10............................................................................................ 72
Table 14: Test case 11............................................................................................ 73
Table 15: Test case 12............................................................................................ 73
Mijash Rajthala 11 | P a g e
CS6PO5 Final Year Project
Abstract
Nepal aspires to become a technological powerhouse and an IT superpower. Yet, many
Nepalese websites, including government-approved ones, suffer from challenges such
as poor loading times and frequent downtime, which significantly impair user experience.
This project tries to address these issues by implementing a load balancer for a website
prototype on a Raspberry Pi 3B cluster using Docker and Kubernetes, with the goal of
increasing website performance and availability.
To accomplish this, the project installs k3s and creates a Kubernetes cluster using a
cluster of Raspberry Pi 3B devices. Docker is then used to bundle the website and its
dependencies into lightweight, portable containers that are distributed across several
cluster nodes. The Kubernetes load balancer is set up to distribute incoming traffic evenly
across containers, maintaining balanced load and minimizing downtime during high traffic
periods.
The study covers load balancing solution demonstrations and testing, demonstrating how
it enhances website speed and availability. It emphasizes the advantages of combining
Docker with Kubernetes for load balancing, such as greater container portability,
scalability, and isolation, as well as Kubernetes' powerful capabilities like as high
availability, rolling updates, monitoring, and backup and restore.
The project underlines the importance of current technologies such as Docker and
Kubernetes in enabling Nepal's IT transformation path. It finishes with potential
enhancement recommendations and future directions, adding to the increasing body of
knowledge on optimizing website performance in resource-constrained contexts.
Mijash Rajthala 12 | P a g e
CS6PO5 Final Year Project
Chapter 1
Introduction
Mijash Rajthala 13 | P a g e
CS6PO5 Final Year Project
1 Introduction
1.1 Project description
Websites are crucial in today's digital world, facilitating global communication,
commerce, and information exchange (Smith, 2018). Unfortunately, high traffic periods
can have a severe impact on website performance and availability, resulting in slow
response times and outages. Load balancing techniques are used to disperse incoming
traffic across multiple servers, ensuring effective resource use and avoiding downtime
(Nguyen, 2019). In this project, we hope to build a load balancer using Docker and
Kubernetes, two commonly used technologies, to improve website performance and
reduce downtime during peak traffic periods.
During peak traffic periods, many regions, including Nepal, experience sluggish
performance and downtime on websites, including government-authorized ones. These
concerns can stymie the country's digital progress and negatively damage user
experience (Nepal, 2020). To address this issue, a project is proposed combining Docker
and Kubernetes to build a load balancing solution that can uniformly distribute incoming
Mijash Rajthala 14 | P a g e
CS6PO5 Final Year Project
traffic across numerous containers, avoiding any single container from becoming a
bottleneck and assuring smooth website performance (Inc., 2021).
To build a Kubernetes cluster, the project will use a Raspberry Pi 3B cluster and k3s. The
website prototype and its dependencies will be containerized using Docker, resulting in
lightweight and portable containers (Kubernetes, 2021). These containers will be
distributed across different nodes in the Kubernetes cluster, taking advantage of
Kubernetes' load balancing capability to efficiently distribute incoming traffic (Bogoychev,
2019). The load balancer will distribute traffic evenly among the containers, limiting
overloading and minimizing the possibility of performance deterioration or outage during
high traffic periods.
The project's goal is to demonstrate how Docker and Kubernetes may improve website
performance and decrease downtime, benefiting websites not just in Nepal but also
globally. We hope to illustrate the potential of load balancing in enhancing website speed
and availability on a worldwide scale by leveraging these new technologies (Roche,
2020). The data and insights gained from this project can help countries become IT
superpowers by tackling the difficulties of website performance and downtime during
heavy traffic periods.
Mijash Rajthala 15 | P a g e
CS6PO5 Final Year Project
These benefits have fueled rapid adoption of Docker and Kubernetes across enterprises
of all sizes, with Gartner forecasting that by 2023, more than 70% of worldwide
Mijash Rajthala 16 | P a g e
CS6PO5 Final Year Project
organizations will be running containerized apps, with Kubernetes as the dominant choice
for container orchestration (Gartner, 2021). Docker and Kubernetes continue to play
crucial roles in influencing the landscape of IT operations and helping businesses to
evolve into IT powerhouses as enterprises seek to upgrade their IT infrastructures and
meet the expectations of the digital age.
Mijash Rajthala 17 | P a g e
CS6PO5 Final Year Project
3 Reliability: The absence of an effective load balancing mechanism can lead to unequal
traffic distribution, resulting in server overloading and potential service outages,
affecting website reliability and availability.
5 User Experience: Bad website speed and frequent downtime can have a detrimental
influence on user experience, resulting in lower user satisfaction and engagement, as
well as potential user loss to competitors.
6 Modernization: As Nepal strives to become an IT superpower, IT infrastructure
modernisation, including the use of Docker and Kubernetes for effective load
balancing, is critical to keeping up with the shifting technology landscape.
Using Kubernetes and Docker to implement a load balancer can benefit users by boosting
website performance, minimizing downtime, and creating a seamless online experience,
allowing for easier access to information and resources and benefiting their educational,
professional, and corporate activities.
Mijash Rajthala 18 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 19 | P a g e
CS6PO5 Final Year Project
The main purpose of this project is to use Kubernetes to build a load balancer that
distributes incoming traffic across several pods or nodes in a Kubernetes cluster and help
to boost the performance, reliability, and availability of the applications and services
running in the cluster.
1.4.2 Objectives
The major objectives of the project are:
Mijash Rajthala 20 | P a g e
CS6PO5 Final Year Project
1.6.2 Development
This section documents the process of selecting a development methodology suitable for
this project. Selection of methodology is based on the ease of implementation and viability
of the methodology for the given project. The upcoming phase documents the survey
analysis for the project before and after development which is done using the selected
methodology. Requirement analysis, design of the project and construction of the project
is documented in respect to the guidelines provided by the methodology.
1.6.4 Conclusion
Limitation of the developed system, work left to be done or improvements that could be
made in the future to this project is documented in this section of the report. Appropriate
reasoning for all the limitations and future work for the project have been documented as
well.
Mijash Rajthala 21 | P a g e
CS6PO5 Final Year Project
Chapter
2 Background
Mijash Rajthala 22 | P a g e
CS6PO5 Final Year Project
Building map design is one of Ajima's core areas of expertise, which includes creating
exact architectural plans that conform with local building codes and regulations. These
maps serve as a blueprint for building projects, ensuring that they are completed on time
and in conformity with all necessary requirements. Ajima's professional architects and
designers work closely with customers to understand their specific requirements and
provide bespoke design solutions.
Mijash Rajthala 23 | P a g e
CS6PO5 Final Year Project
Ajima is well-known for its expertise, meticulous attention to detail, and dedication to
customer satisfaction. They are eager to work with suggestions and give the appropriate
official documentation to guarantee that projects move forward smoothly. As a client for
this project, Ajima recognizes its viability and utility and is eager to collaborate to achieve
good outcomes.
Mijash Rajthala 24 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 25 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 26 | P a g e
CS6PO5 Final Year Project
containerized applications on Raspberry Pi nodes. With k3s, you may declare your
application's desired state in a manifest file, and k3s will automatically verify that the
actual state matches the desired state by managing container scheduling, placement,
and monitoring.
Mijash Rajthala 27 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 28 | P a g e
CS6PO5 Final Year Project
resistance to failures and disturbances. Docker and k3s enable the deployment of
numerous containers or nodes in different locations, allowing traffic to be served even if
individual nodes or parts of the infrastructure fail. k3s monitors container and node health
and can reschedule failed containers to healthy nodes or replace failed nodes with new
ones. This ensures that your web application stays up and accessible even when the
infrastructure is poor or unstable. Furthermore, k3s has capabilities such as automated
rolling updates, which allow you to upgrade containers without downtime, and self-
healing, which automatically replaces failed containers, making it a strong choice for
ensuring high availability in difficult infrastructure scenarios.
This section outlines several similar projects from which ideas were borrowed to
create the project. Discussions also include how those systems were created, how they
function, and how they were critically analyzed.
Author: Prawjol Mohan, Tejas Jambhale,Lakshya Sharma, Simran Koul, Smriti Koul
The project aims to simplify and improve the efficiency of the entire development
process using Kubernetes and docker (open-source platforms). According to this project,
Kubernetes clusters consist of Pods, Flat Networking Spaces, Labels, Replication
Controllers, and Services.
The advanced load balancing capabilities of NGINX Plus make it the ideal load
balancer in front of the collection of upstream servers: load adjusting and session
determination, HTTP well-being checking and server moderate beginning, live movement
observing, and dynamically designed upstream server collection. Scalability, self-heating,
Mijash Rajthala 29 | P a g e
CS6PO5 Final Year Project
and mobility, according to an author, are the main factors that make Kubernetes more
popular than Docker clusters worldwide.
Author: Mrs. S.S. Kumbar, Shrikant Biradar, Akshay Thalkari, Sanket Jadhav
This project attempts to provide equal power distribution among some places with
overloaded and some areas with less loaded areas. The component used in this project
is ADE7758 (Monitoring IC), Silicon Bridge Rectifier, and Regulator.
This project provides the details of load balancing and ways for how to build and
implement a load balancing in the power distribution. This project prevents load
unbalancing phase when the unbalancing problem occurs by employing automatic three
phase load equalization.
In this project, manually load shifting is done but to decrease the manpower and for the
accuracy this project is important and which balances the three phases by monitoring
electrical equipment, utilizing control panels, switching matrix which helps to improve the
power system.
Mijash Rajthala 30 | P a g e
CS6PO5 Final Year Project
This project aims to create the RAP algorithm to observe other cluster resources
such as graphics processing units and storage. In this project,an author presented the
proxy named RAP for the K8s-based edge computing environment which gives the
capacity to observe the resource state of workers during load-balancing activities. The
components such as etcd, kube-scheduler, kube-apiserver and kube-controller-manager
in master node and the components such as kubelet, kube-proxy, container runtime in
worker node which is utilized in this project. In this study, the authors studied the
implementation of RAP in other containerized orchestrations.
2.4 Comparison
2.4.1 Comparison table
S.N Features Project Project 2 Project 3 This
Yes project
Mijash Rajthala 31 | P a g e
CS6PO5 Final Year Project
The projects I'm comparing my work on load balancing in Docker and Kubernetes
environments with are Prajval Mohan et al"Load .'s Balancing using Docker and
Kubernetes: A Comparative Analysis" (2020), Ms. S.S. Kumbar et al"Three-Phase .'s
Load Balancing" (2017), and Quang-Minh Nguyen et al (2022).
Mijash Rajthala 32 | P a g e
CS6PO5 Final Year Project
technologies, and additional research might assist in identifying areas for improvement or
innovation in the sector.
Mijash Rajthala 33 | P a g e
CS6PO5 Final Year Project
Chapter 3
Design and Development
Mijash Rajthala 34 | P a g e
CS6PO5 Final Year Project
DevOps systems frequently innovate, and new ideas lead to new improvements, which
makes the system versatile. The innovation and adjustments that can ultimately please
the customer are made possible by design, testing, and improvement. The client's
requirements may change over time; hence the prototype can be altered more than once.
The internal and external supervision's critique of this system is also welcomed by the
evolutionary prototype technique.
Mijash Rajthala 35 | P a g e
CS6PO5 Final Year Project
• Early feedback: Evolutionary prototyping allows for early user feedback, which
can help to detect and address any difficulties or user demands early in the
development process.
Mijash Rajthala 36 | P a g e
CS6PO5 Final Year Project
3.3 Phases
The major phases of evolutionary prototyping are:
Mijash Rajthala 37 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 38 | P a g e
CS6PO5 Final Year Project
According to the survey, 71.4% of respondents identified as "Other" for their present
profession, while 14.3% identified as students and 14.3% as IT practitioners.
Furthermore, 57.1% of respondents said they were familiar with DevOps. When asked to
rank their understanding about servers, most respondents (50%) gave it a 3 on a scale
of 1 to 5. Similarly, when asked how important it is to have a server that runs smoothly,
the majority of respondents (64.3%) ranked it a 5 on a scale of 0 to 5. According to the
survey, 83.3% of respondents were unaware of Dos Attacks, and 92.9% of those who
were aware of Load-Balancers identified Amazon AWS and Microsoft Azure as tools that
may establish a Load balancer. Finally, all respondents reported hearing about recent
Mijash Rajthala 39 | P a g e
CS6PO5 Final Year Project
server failures, with the majority (50%) rating the impact of server failures on personal
and professional lives as a 4 on a scale of 0 to 5. Respondents differed on the extent to
which a load balancer can reduce server downtime.
3.4.2 Post-Survey
Appendix III Responses
Mijash Rajthala 40 | P a g e
CS6PO5 Final Year Project
According to the survey results, the majority of participants were satisfied with the load
balancing implementation, with 71.4% rating satisfaction or extremely satisfaction.
Furthermore, 71.4% of participants said the load balancer improved the performance and
scalability of their application, with 57.1% saying it had a rather significant impact.
The survey did, however, indicate several areas for improvement. For example, 42.9% of
participants judged load balancer configuration and management to be somewhat or
extremely challenging, while 50% reported challenges during implementation. Some
participants reported satisfactorily fixed issues, while others reported unsolved issues.
Overall, the load balancer was considered very effective at spreading traffic throughout
the cluster's containers and nodes, with 50% of participants reporting a somewhat
substantial impact on attaining high availability and redundancy for their application. 50%
of participants indicated a slight reduction in cost and complexity, with 7.1% indicating a
major reduction.
Mijash Rajthala 41 | P a g e
CS6PO5 Final Year Project
Finally, the majority of participants (78.6%) would recommend Kubernetes and Docker to
other enterprises for load balancing. The reasons for the recommendations varied, but
the majority of panellists highlighted enhanced performance, scalability, and high
availability as advantages.
In conclusion, the survey gave significant insights about the project's load balancing
implementation using Kubernetes and Docker. While there were some shortcomings, the
overall outcomes were favorable, with the majority of participants pleased with the
implementation and recommending it to other businesses.
✓ The majority of responders were pleased with the project's load balancing
implementation, which used Kubernetes and Docker.
✓ The load balancer was regarded by the majority of responders to have improved
the application's performance and scalability.
✓ A considerable proportion of respondents thought that configuring and operating
the load balancer in Kubernetes and Docker was rather complex.
✓ Almost half of the respondents reported problems during the load balancer setup,
and only half of them were resolved properly.
✓ Most responders thought the instructions and tools for establishing a load balancer
in Kubernetes and Docker were helpful.
✓ A considerable proportion of responders reported issues or limits with the load
balancer in Kubernetes and Docker.
✓ The load balancer was thought to be quite successful in distributing traffic among
the cluster's containers and nodes.
✓ Most responders thought the load balancer aided in achieving high availability and
redundancy for the application.
✓ The load balancer was regarded by the majority of responders to have lowered the
project's cost and complexity.
Mijash Rajthala 42 | P a g e
CS6PO5 Final Year Project
3.5.2 Compatibility:
The system should be designed to work with a wide variety of software and hardware
platforms, ensuring compatibility with various client devices and applications. This
includes compatibility with multiple hardware configurations, such as different CPUs,
memory capacities, and storage options, as well as support for common operating
systems, databases, programming languages, and protocols. Compatibility testing and
validation should be carried out to verify that the system integrates effectively with current
IT infrastructure and third-party software solutions, lowering the chance of
incompatibilities that could impede system performance or functioning.
Mijash Rajthala 43 | P a g e
CS6PO5 Final Year Project
3.5.3 Scalability:
The prototype server should be designed to manage an increase in workload or user
demand with no performance issues. This comprises the ability to extend horizontally or
vertically, depending on the system architecture, to handle more concurrent users,
increasing data processing needs, or other scalability requirements. The system should
also have techniques for automatically allocating resources such as CPU, memory, and
storage as needed to ensure optimal performance even during peak usage periods.
Scalability testing should be performed to ensure that the system can manage higher
workloads without degrading performance or availability.
3.5.4 Reliability:
The prototype server should be highly dependable, with little or no downtime and no or
few crashes. To reduce single points of failure, use redundant hardware components like
as power supplies, network cards, and storage devices. To maintain high availability and
data integrity, the system should also include built-in fault tolerance techniques such as
automatic failover, load balancing, and backup and recovery operations. Furthermore,
extensive testing and quality assurance processes should be performed prior to
deployment to detect and resolve any potential reliability issues, and continual monitoring
and maintenance should be performed to proactively address any potential issues and
preserve system reliability.
3.5.5 Cost-effective:
The system should be built to be cost-effective, taking into account elements such as
hardware expenses, licensing fees, maintenance and support costs, and operational
costs. The system should be cost-effective while providing the necessary functionality
and performance. This involves optimizing resource use to reduce hardware
requirements, adopting open-source or cost-effective technologies when appropriate, and
conducting cost-benefit analysis to make educated technology choices and investments.
Furthermore, the system should have a clear and transparent pricing mechanism with no
hidden charges, as well as a visible return on investment for business management.
Mijash Rajthala 44 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 45 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 46 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 47 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 48 | P a g e
CS6PO5 Final Year Project
3.6.2 Flowchart
Mijash Rajthala 49 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 50 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 51 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 52 | P a g e
CS6PO5 Final Year Project
The flowchart depicts the operation of a project involving a Raspberry Pi, Docker
containers, an NGINX web server, and Kubernetes load balancing. It all begins with
configuring the Raspberry Pi and creating Docker containers to host the web application
or website. The Docker containers are then setup using NGINX, which is then deployed
to Kubernetes for orchestration and load balancing. The flowchart depicts the Kubernetes
load balancing mechanism and how the website or web application can be accessed via
the load balancer. The flowchart depicts the stages involved in the project's working
mechanism, from installation to accessing the website via load balancing.
Mijash Rajthala 53 | P a g e
CS6PO5 Final Year Project
The Gantt chart was routinely updated during the implementation phase to reflect the
project's progress. Unexpected delays or impediments arose along the route,
necessitating additional adjustments to the Gantt plan. However, the project team
remained dedicated to the project's objectives and worked tirelessly to solve these
challenges.
As seen in the final version of the Gantt chart, the project was successfully completed
within the revised timeline. While variations existed between the first proposal submission
and the final Gantt chart, the project team recognized the need of reacting to changes as
they developed in order to provide a successful end.
Mijash Rajthala 54 | P a g e
CS6PO5 Final Year Project
3.7 Implementation
The project involved building a load balancer with Docker and Kubernetes to distribute
incoming network traffic across a cluster of Raspberry Pis. Several essential parts of the
implementation process included:
Mijash Rajthala 55 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 56 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 57 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 58 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 59 | P a g e
CS6PO5 Final Year Project
➢ Testing and validation: The project team carried out extensive testing plans to
guarantee that the application worked as intended under various scenarios. The
Mijash Rajthala 60 | P a g e
CS6PO5 Final Year Project
team performed a variety of tests, including load testing, fault tolerance testing,
and data consistency testing.
Mijash Rajthala 61 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 62 | P a g e
CS6PO5 Final Year Project
During the testing various errors were showing up and the errors were solved by
consulting withsupervisor.
Mijash Rajthala 63 | P a g e
CS6PO5 Final Year Project
Overall, the load balancer deployment using Docker and Kubernetes was successful. The
application proved to be highly available, scalable, and reliable. Containerization of
application components, as well as seamless deployment and scaling via Kubernetes,
made application management simple. Furthermore, the careful selection and design of
load balancing algorithms guaranteed that incoming traffic was distributed efficiently.
Mijash Rajthala 64 | P a g e
CS6PO5 Final Year Project
Chapter 4
Testing and analysis
Mijash Rajthala 65 | P a g e
CS6PO5 Final Year Project
cases
10 Scalability evaluation
Mijash Rajthala 66 | P a g e
CS6PO5 Final Year Project
4. 2 Unit testing
❖ API endpoint testing
Test case 1
Objectives To ensure that API endpoints are working correctly and
providing accurate responses.
Action Enter the API call command
Expected result API runs smoothly
Actual Result It does run smoothly
Conclusion Test successful
Table 4: Test case 1
Evidence
Figure 36: Pt 2
Mijash Rajthala 67 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 68 | P a g e
CS6PO5 Final Year Project
Test case 5
Objectives Check response time
Action Ping
Expected result Pinged
Actual Result Pinged
Conclusion Test successful
Table 8: Test case 5
Mijash Rajthala 69 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 70 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 71 | P a g e
CS6PO5 Final Year Project
❖ Scalability evaluation
❖ Test case 10
Objectives To scale the pods
Action Use docker command to scale the
pods
Expected result 5 pods are created at once
Actual Result Yes they are created
Conclusion Test successful
Table 13: Test case 10
Mijash Rajthala 72 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 73 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 74 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 75 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 76 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 77 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 78 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 79 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 80 | P a g e
CS6PO5 Final Year Project
The project was completed using Evolutionary prototyping methodology. The project was
thoroughly evaluated at each level of development to verify its usefulness and
dependability. Every part of the project was carefully tested, from unit testing to system
testing, and any detected defects were corrected as soon as possible. During the testing
phase, several scenarios were simulated to ensure that the project could withstand heavy
loads and unforeseen mistakes. The adoption of automated testing technologies boosted
the testing process even further, making it more efficient and effective.
During testing, I was able to detect and resolve numerous bugs, which improved the
overall performance and stability of the application. The successful completion of the
testing phase meant that the project could be confidently launched. Overall, the testing
process was an important element of project development because it ensured that the
final product was of high quality and satisfied all of the client's expectations.
4.4.1 Strengths
❖ The project makes use of cutting-edge technologies like Docker and Kubernetes,
which are widely employed in industry.
❖ The use of load balancing aids in traffic distribution and website availability.
❖ The use of two Raspberry Pi devices increases system redundancy.
❖ The usage of Ngrok for public tunneling makes it possible to visit the website from
anywhere.
❖ Nginx is a widely used and popular web server software.
❖ The project takes use of well-known and extensively used technologies like as
Docker, Kubernetes, and NGINX, making it easily customizable and scalable.
❖ The usage of Raspberry Pi models as hardware saves money and enables for
simple setup and configuration.
❖ Implementing a load balancer increases the website's overall reliability and
performance, making it more accessible to users.
Mijash Rajthala 81 | P a g e
CS6PO5 Final Year Project
❖ Using ngrok with a public tunnel provides secure access to the website from any
place.
❖ The project's goal of load balancing traffic to improve website performance was
met with success.
4.4.2 Weaknesses
❖ To correctly set up and setup the project, considerable technical knowledge and
skill may be required.
❖ The use of Raspberry Pi models as hardware may limit the system's total capacity
and scalability.
❖ Depending on the volume of traffic, the load balancing configuration may need to
be fine-tuned further for best performance.
❖ The use of third-party services such as ngrok may pose security problems.
Mijash Rajthala 82 | P a g e
CS6PO5 Final Year Project
Chapter 5
Conclusion
Mijash Rajthala 83 | P a g e
CS6PO5 Final Year Project
5. Conclusion
Load balancing with Docker and Kubernetes on Raspberry Pi clusters is a potential
method for optimizing server designs in today's dynamic internet and AI-driven world.
Containers and orchestration technologies provide efficient application deployment and
management, while Raspberry Pi devices offer an economical and accessible clustering
solution.
This solution can efficiently distribute incoming traffic across multiple server nodes using
containerization and orchestration technologies, optimizing resource usage and ensuring
high availability. This solution is made available and affordable for small to medium-sized
businesses, startups, educational institutions, and hobbyists alike thanks to the use of
Raspberry Pi devices for clustering and prototyping. As traffic demands rise, this
configuration's flexibility and scalability make it simple to grow by adding more Raspberry
Pi units to the cluster.
Mijash Rajthala 84 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 85 | P a g e
CS6PO5 Final Year Project
framework and contribute to the responsible and legally acceptable usage of electronic
transactions.
5.2 Advantages
The load balancer project that uses Docker, Kubernetes, and Raspberry Pi servers has
various advantages. It enhances system performance by efficiently distributing incoming
traffic, improves system security with features such as SSL termination and IP filtering,
enables scalability by adding or removing servers based on traffic variations, optimizes
resource utilization by evenly distributing traffic and workload, and provides cost-
effectiveness by utilizing existing resources. Furthermore, it automates day-to-day
network management operations, enhancing efficiency, and future-proofing the system
through the use of new technologies widely used in the IT industry.Improved efficacy,
availability, and scalability.
Mijash Rajthala 86 | P a g e
CS6PO5 Final Year Project
5.3 Limitations
Hardware limits, network constraints, containerization complexity, compatibility
challenges, and security concerns are all potential limitations. However, with good
planning, monitoring, and administration, such as upgrading hardware, optimizing
networks, learning Docker and Kubernetes, picking suitable software, and adopting
security measures, these can be avoided.
Mijash Rajthala 87 | P a g e
CS6PO5 Final Year Project
• increased scalability
• Security aspects that are cutting-edge
• Compatibility with other containerization technologies
• Cloud computing
• Advanced analytics and monitoring
• Self-healing and automation capabilities
• Integration with DevOps techniques
• Hybrid environment support
Mijash Rajthala 88 | P a g e
CS6PO5 Final Year Project
Chapter 6
Bibliography
Mijash Rajthala 89 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 90 | P a g e
CS6PO5 Final Year Project
Nepal, G. o., 2020. Nepal Government National Portal | नेपाल सरकारको आधिकाररक पोर्ट ल
| Nepal. [Online]
Available at: https://www.nepal.gov.np/
[Accessed 9 April 2023].
New York Man Charged With Theft of Trade Secrets (2018) The US department of
justice.
Nguyen, T. H. &. L. C., 2019. Load balancing techniques for distributed systems.
International Journal of Computer Networks and Communications Security, 1(7), pp. 18-
29.
Prajval Mohan, T. J. L. S. S. K. S. K., 2020. Load Balancing using Docker and
Kubernetes: A. International Journal of Recent Technology and Engineering (IJRTE),
9(2), p. 11.
Quang-Minh Nguyen, L.-A. P. a. T. K. *., 2022. Load-Balancing of Kubernetes-Based
Edge Computing. Journal about Kubernetes, 2(3), p. 16.
Roche, R., 2020. Load Balancing with Docker and Kubernetes.. Communications of the
ACM, 12(63), pp. 40-45.
rs. S.S. Kumbar, S. B. A. T. S. J., 2017. THREE PHASE LOAD BALANCING.
International Research Journal of Engineering and Technology (IRJET), 4(3), p. 3.
Sadek, M. M., Khalifa, A. S. & Mostafa, M. G. M., 2015. Video steganography: a
comprehensive review. Multimedia tools and applications, 74(17), pp. 7063-7094.
Sandle, D. T., 2022. Hackers using ‘steganography’ tactics for malware attacks - Digital
Journal. [Online]
Available at: https://www.digitaljournal.com/tech-science/hackers-using-steganography-
tactics-for-malware-attacks/article
[Accessed 5 January 2023].
Shih, F. Y., 2017. Digital Watermarking and steganography: Fundamentals and
techniques. 2nd ed. s.l.:s.n.
Smith, J., 2018. The importance of websites in the modern global economy.. Journal of
Digital Commerce, 2(10), pp. 45-56.
Wu, S., Zhong, S. & Liu, Y., 2018. Deep residual learning for image steganalysis.
Multimedia tools and applications, 77(9), pp. 10437-10453.
Mijash Rajthala 91 | P a g e
CS6PO5 Final Year Project
Ye, J., Ni, J. & Yi, Y., 2017. Deep learning Hierarchical Representations for image
Steganalysis. IEEE transactions on information forensics and security, 12(11), pp. 2545-
2557.
References
(CNCF), C. N. C. F., 2021. CNCF Survey: Kubernetes and Cloud Native Landscape..
s.l.:CNCF.
Anon., 2022. Steganography. [Online]
Available at: https://www.steganography.ch/
[Accessed 5 January 2023].
Bogoychev, N., 2019. Load balancing in Kubernetes: The Definitive Guide. Packt
Publishing.. s.l.:Packt.
Cheddad, A., Condell, J., Curran, K. & Mc Kevitt, P., 2010. Digital image
Steganography: Survey and analysis of current methods. Signal processing, 90(3), pp.
727-752.
Dextrava, 2022. eSewa Not Working » Dextrava.com - Digital Marketing Pro. [Online]
Available at: https://digital.naslnews.com/esewa-not-working-dextrava-com/
[Accessed 22 December 2022].
Docker, 2021. Docker. [Online]
Available at: https://www.docker.com/what-docker
[Accessed 9 April 2023].
ETtech, 2022. Gmail down: Gmail down for users globally, including in India - The
Economic Times. [Online]
Available at: https://economictimes.indiatimes.com/tech/trendspotting/gmail-down-for-
users-globally-including-in-india/articleshow/96137239.cms
[Accessed 26 December 2022].
Gartner, 2021. Containers Drive Cloud and DevOps Transformation. [Online]
Available at: https://www.gartner.com/document/3994676/predicts-2021-containers-
drive-cloud-and-devops-transformation
[Accessed 9 April 2023].
Guo, L., Ni, J. & Shi, Y. Q., 2014. Uniform Embedding for efficient JPEG
Steganography. IEEE transactions on information forensics and security, 9(5), pp. 814-
825.
Inc., D., 2021. Docker: Accelerated, Containerized Application Development. [Online]
Available at: https://www.docker.com/
[Accessed 9 April 2023].
Mijash Rajthala 92 | P a g e
CS6PO5 Final Year Project
Nepal, G. o., 2020. Nepal Government National Portal | नेपाल सरकारको आधिकाररक पोर्ट ल
| Nepal. [Online]
Available at: https://www.nepal.gov.np/
[Accessed 9 April 2023].
New York Man Charged With Theft of Trade Secrets (2018) The US department of
justice.
Nguyen, T. H. &. L. C., 2019. Load balancing techniques for distributed systems.
International Journal of Computer Networks and Communications Security, 1(7), pp. 18-
29.
Prajval Mohan, T. J. L. S. S. K. S. K., 2020. Load Balancing using Docker and
Kubernetes: A. International Journal of Recent Technology and Engineering (IJRTE),
9(2), p. 11.
Quang-Minh Nguyen, L.-A. P. a. T. K. *., 2022. Load-Balancing of Kubernetes-Based
Edge Computing. Journal about Kubernetes, 2(3), p. 16.
Roche, R., 2020. Load Balancing with Docker and Kubernetes.. Communications of the
ACM, 12(63), pp. 40-45.
rs. S.S. Kumbar, S. B. A. T. S. J., 2017. THREE PHASE LOAD BALANCING.
International Research Journal of Engineering and Technology (IRJET), 4(3), p. 3.
Sadek, M. M., Khalifa, A. S. & Mostafa, M. G. M., 2015. Video steganography: a
comprehensive review. Multimedia tools and applications, 74(17), pp. 7063-7094.
Sandle, D. T., 2022. Hackers using ‘steganography’ tactics for malware attacks - Digital
Journal. [Online]
Available at: https://www.digitaljournal.com/tech-science/hackers-using-steganography-
tactics-for-malware-attacks/article
[Accessed 5 January 2023].
Shih, F. Y., 2017. Digital Watermarking and steganography: Fundamentals and
techniques. 2nd ed. s.l.:s.n.
Mijash Rajthala 93 | P a g e
CS6PO5 Final Year Project
Smith, J., 2018. The importance of websites in the modern global economy.. Journal of
Digital Commerce, 2(10), pp. 45-56.
Wu, S., Zhong, S. & Liu, Y., 2018. Deep residual learning for image steganalysis.
Multimedia tools and applications, 77(9), pp. 10437-10453.
Ye, J., Ni, J. & Yi, Y., 2017. Deep learning Hierarchical Representations for image
Steganalysis. IEEE transactions on information forensics and security, 12(11), pp. 2545-
2557.
Mijash Rajthala 94 | P a g e
CS6PO5 Final Year Project
7. Appendix
7.1 Appendix I
Mijash Rajthala 95 | P a g e
CS6PO5 Final Year Project
The name of the program implies that it is created incrementally. The software is broken
up into independent modules or modules with sporadic connections to one another.
These distinct components are currently being developed simultaneously. A final
prototype is created after the integration of all modules.
The software is finished faster since all the components are created and tested
simultaneously. However, since the modules may have been created by various teams,
it is possible that they won't be compatible with one another. But by properly planning the
software's whole development, this problem can be solved.
Mijash Rajthala 96 | P a g e
CS6PO5 Final Year Project
➢ Risk is easier to manage as risky pieces are identified and handled during the
iteration process.
3.1.3 Prototyping Methodology
7.2 Appendix II
Mijash Rajthala 97 | P a g e
CS6PO5 Final Year Project
Pre-Survey responses
Mijash Rajthala 98 | P a g e
CS6PO5 Final Year Project
Mijash Rajthala 99 | P a g e
CS6PO5 Final Year Project
Back to Pre-survey
7.4 Appendix IV
7.4.1 How I clustered
7.4.2 Appendix IV B
Computer
There will be requirement of a computer with at least 4 gigs RAM to run multiple
OS on the virtual box. Computer will also be required to install Docker and Kubernetes
on the prototype server. Even clusterization is done with the help of a computer.
Raspberry pi
This is required to be used as a server for the docker deployment. At least two of these
would be sufficient to run the docker containers smoothly.
Micro SD card
SD Card reader
This will be needed to be used side by side with the SD card to install Kubernetes and
docker on the raspberry.
Power cable
Patch cable
It help as a physical link between raspberry pi and router to assign static IP address.
Router
cable
Virtual box This is the software where different OSes of Linux OSes will be
hosted.
Ubuntu iso This file is necessary to install ubuntu on virtual box.
file
Kali Linux This file is required to install Kali Linux on virtual box.
iso file
Raspbian This file is required to install Raspberry Pie on virtual box.
OS iso file
JavaScript This is needed to create our website.
7.5 Appendix V
7.5.1 Gantt chart
7.5.3 Milestones