Choosing the Right Load Balancing for Microservices: Centralized, In‑Process, Independent

The article explains three primary load‑balancing and service‑discovery patterns for microservice architectures—centralized external load balancers, client‑side soft load balancing, and independent host‑level LB processes—detailing their mechanisms, advantages, drawbacks, and real‑world examples such as F5/HAProxy, Netflix Eureka/Ribbon, and Airbnb SmartStack.

21CTO
21CTO
21CTO
Choosing the Right Load Balancing for Microservices: Centralized, In‑Process, Independent

Microservice architecture consists of many fine‑grained services that communicate via lightweight mechanisms, which introduces service registration and discovery, load balancing, and health‑check concerns.

01 Centralized Load Balancer

An independent load balancer (hardware like F5 or software such as LVS, HAProxy) holds a mapping of service addresses. Clients discover the LB via DNS. The LB performs load‑balancing (e.g., round‑robin) and health checks. Drawbacks include a single point of failure and added latency.

02 In‑Process Load Balancer (Soft Load Balancing)

This approach embeds the LB logic inside the client process, requiring a service registry (e.g., Zookeeper, Consul, Etcd) for self‑registration and discovery. The client queries the registry, caches the address list, applies a balancing strategy, and calls the target directly, avoiding extra hops. It demands a highly available registry and incurs development overhead for multiple language client libraries; upgrades also require code changes. Examples: Netflix Eureka with Karyon and Ribbon, Alibaba Dubbo.

03 Independent LB Process

A compromise that runs a separate LB process on each host. Services on the same host query this local LB for discovery and balancing, using a registry (e.g., Zookeeper) for health checks. It eliminates the single‑point failure of a centralized LB, avoids client‑side libraries, and simplifies upgrades, though deployment is more complex. Example: Airbnb SmartStack with Zookeeper, Nerve, and Synapse/HAProxy.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Distributed SystemsBackend ArchitectureMicroservicesload balancingservice discovery
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.