Work

Enhancing Kubernetes Traffic Distribution with a Dynamic Load Balancer Using Serverless Computing

Year: 2025
Type: dissertation
Abstract: Traditional Kubernetes LoadBalancer Services use round-robin or session-based algorithms for traffic distribution. While effective for stateless applications, this approach ignores real-time variations in pod resource utilization, allowing bottlenecks to emerge when some pods become overloaded and others remain idle. To address this critical gap, this paper introduces a dynamic metrics-driven load balancer. We integrate a Google Cloud Function as a serverless ingress point that delegates routing to a custom Python service within the Kubernetes cluster. This balancer queries a Prometheus monitoring stack for live pod CPU utilization and intelligently forwards each request to the least loaded pod, ensuring fair distribution and maximum resource efficiency. We validated the design on a three-node Google Kubernetes Engine cluster hosting an Nginx application and conducted controlled load tests comparing the default Kubernetes Service against our dynamic model. The dynamic architecture achieved 100% request success and maintained pod CPU variance within ±10%, whereas round-robin suffered a 20% failure rate and ±25% CPU variance. Conceptually, our work extends state-of-the-art by demonstrating a lightweight, non-intrusive mechanism for real-time traffic steering without ML (Machine Learning)/RL (Reinforcement Learning) overhead. Practically, it empowers operators to guarantee reliability and efficient utilization under heterogeneous workloads. Future research will explore multi-metric scoring (e.g., memory, network I/O) and adaptive caching to further reduce latency while preserving balanced distribution.
Language: English
Open Access status: green
OpenAlex ID: W7140064060
Cites: 21
Cited by:
Related to: 10