Book Image

Practical gRPC

By : Joshua B. Humphries, David Konsumer, David Muto, Robert Ross, Carles Sistare
Book Image

Practical gRPC

By: Joshua B. Humphries, David Konsumer, David Muto, Robert Ross, Carles Sistare

Overview of this book

While building systems that contain several components, you need a framework that is fast and has minimal network overhead. gRPC is one such open-source tool that is quickly becoming popular and gaining popularity with programmers. Practical gRPC introduces you to gRPC and explains how it compares and contrasts with similar technologies. You’ll be introduced to key technologies such as Protocol Buffers, and work your way up from basic gRPC usage, all the way through to its more advanced capabilities. You’ll learn the best practices for defining and evolving your gRPC APIs, and discover how different tools can be leveraged to get the most out of gRPC and even extend it. By the end of this book, you'll have all the information you need to get started building systems with gRPC.
Table of Contents (13 chapters)
11
11. Extending gRPC services

Chapter 9. Load balancing

One of the common issues when it comes to scalability is how to balance the load all over the servers intended to ingest the incoming and growing traffic. Plenty of proxies are intended to do so for HTTP/1.x natively, but since HTTP/2 is a binary protocol, instead of plain text, they will need other plugins to achieve it.

In addition to proxy solutions, gRPC proposes client load balancing, where the clients somehow know about the backend configuration and they dispatch the messages directly to the servers in a proper and intelligent way.

Which solution should you adopt between client and proxy load balancing? Well, it depends on the context of your application. We’ll try to figure out which are the advantages and disadvantages of each option and let you decide what is your optimal configuration.