Log10 Loadshare 📌 🔥
| Context | Definition of Loadshare | | :--- | :--- | | Load Balancer | The number of active connections or requests per second (RPS) routed to a single backend server. | | Message Queue | The number of unacknowledged messages a specific consumer is processing. | | Database Shard | The query throughput or data volume stored on a specific shard replica. | | CDN Edge Node | The bandwidth or request count handled by a particular Point of Presence (PoP). |
In an ideal world, every node would have a perfectly equal loadshare. If you have 10 servers and 10,000 RPS, the ideal loadshare per server is 1,000 RPS. Reality, however, introduces skew—due to slow hardware, "hot shards," or suboptimal routing algorithms.
Most modern load balancers support weight assignment: log10 loadshare
| Approach | Behavior | Use case | |----------|----------|----------| | Linear | Shares directly proportional to metric | Homogeneous capacity, no risk of starvation | | log10 | Compresses large differences, prevents one server from dominating | High dynamic range of capacities, protection of weak nodes | | Natural log (ln) | Similar shape, slightly different curve | When metric differences are moderate | | Square root | Less aggressive compression than log10 | Medium compression needed |
Log10 is particularly popular because:
Reactive autoscaling (e.g., KEDA, HPA) often uses thresholds like "scale if CPU > 80%". But CPU is a noisy metric. Request-based scaling using raw RPS is better, but it suffers from the "elephant vs. mouse" problem: a 10x spike in RPS on a small service looks identical to a 10% spike on a large service.
Using log10 loadshare for scaling decisions creates exponential scaling policies: | Context | Definition of Loadshare | |
This ensures that small services scale up earlier (proportionally) and large services don't over-react to minor fluctuations.
In the era of microservices, cloud-native architectures, and high-throughput data pipelines, load balancing is not just a feature—it is a necessity. However, as systems scale from handling thousands to billions of requests per second, traditional load-balancing algorithms (like Round Robin or Least Connections) often fall short. They struggle with skewed distributions, heterogeneous server capacities, and exponential traffic patterns. This ensures that small services scale up earlier
Enter Log10 Loadshare—a mathematical approach to distributing traffic that leverages the base-10 logarithm to create fair, scalable, and efficient load distribution across uneven tiers of infrastructure.
This article will explore what Log10 Loadshare is, why it matters, how to implement it, and real-world use cases where it outperforms conventional methods.
