Rust Pingora Framework Practice: Building a load balancer

Beck Moulton
4 min readAug 12, 2024

Pingora is a Rust framework for building fast, reliable, and programmable network systems. It has been tested in practice and has been serving more than 40 million internet requests per second in the past few years.

Features of Pingora

Asynchronous I/O: By utilizing Rust’s asynchronous features, Pingora can perform non-blocking I/O operations, thus achieving better performance and scalability.

HTTP 1/2 end-to-end proxy

  1. Support TLS, including OpenSSL or BoringSSL

4, gRPC and websocket proxy

  1. Elegant overload

Customizable load balancing and failover strategies

  1. Support various observability tools

Reasons to use Pingora

  • Safety: For services written in C/C, Pingora is a more memory-safe choice.
  • Performance: Pingora is fast and efficient. For workloads that are sensitive to cost and system speed, the time and resource savings are noticeable.
  • Customizable: The API provided by Pingora proxy framework is highly programmable. For users who want to build customized advanced gateways or load balancers, Pingora provides powerful and simple implementation methods.

Pingora is built with Rust, which means it can fully utilize the language’s features and libraries. It seamlessly integrates with other Rust tools and crates…

--

--

Beck Moulton

Focus on the back-end field, do actual combat technology sharing Buy me a Coffee if You Appreciate My Hard Work https://www.buymeacoffee.com/BeckMoulton