An Adaptive Context-Aware Scheduler for Serverless Kubernetes Environment using Contextual Multi-Armed Bandits
Serverless computing is a powerful paradigm which enables fine-grained, Event-driven execution of lightweight functions by abstracting infrastructure management. In dynamic heterogeneous Kubernetes clusters, there is a need for Adaptive learning based effective function placement scheduler to solve critical challenge in minimizing latency and optimizing overall system performance. In this proposed framework, we integrate real-time node and function context derived directly from Kubernetes and Knative environment. It incorporates parameters such as CPU and memory availability, concurrency, execution time, and priority. With this a custom scheduler is developed by dynamically mapping incoming serverless workloads to suitable nodes based on learned reward mechanisms. Here it uses multi armed bandits algorithms for intelligent function placement in serverless platforms such as Knative deployed on Kubernetes cluster with Knative workloads and extensive experiments are conducted using approximately 300 dynamically generated Knative functions deployed on a Kubernetes cluster. Our system model using contextual features including cold start latency, warm start latency, request latency, CPU capacity, memory availability, throughput etc. Functions (or containers) are characterized by their resource demands and expected execution time. Our experimental results show that Decision Tree Bandits achieves slightly better performance than the default Kubernetes scheduler by achieving lower latency, higher throughput. These findings highlight the effectiveness of the DTB-based scheduling approach in enhancing responsiveness and efficiency in serverless Kubernetes environments.