A Comparative Analysis on Load Balancing and gRPC Microservices in Kubernetes

Katherine Nieman, Sayeed Sajal · 2023

This report provides observations and insights on load balancing in gRPC microservices in Kubernetes using Go. gRPC holds a single client-server connection until the connection completes, making it tricky to load balance gRPC requests across multiple server resources. This also means that, without careful configuration, scaling the server resources may not provide any help in handling loads of client RPC requests. Luckily, Go's gRPC library has some built-in functionality for load balancing using round-robin logic. However, this involves bypassing some of the features in Kubernetes by making the server a headless Service. A maximum connection age can also be configured in gRPC servers to reduce connection times and give the client more chances to reconnect, which can create some balancing as well. To make these observations, we created and deployed multiple gRPC microservices in a Kubernetes cluster, and adjusted many aspects of their configurations to observe the behavior changes. The source code for this proiect is located on Github.11https://github.com/stars/thaigoonch/lists/research-project

Read the paper · More papers on PaperTik