Urgent.News

What's breaking now, across thousands of outlets.

Tech

Load Balancing Starts Before the Load Balancer: Routing Patterns for Distributed Systems

Load balancing isn't just a load balancer. Learn how routing works for databases, caches, and stream processors, and how to handle hot partitions

Load Balancing Starts Before the Load Balancer: Routing Patterns for Distributed Systems

This article is the third in a series on control plane architecture and design patterns. In the previous articles, the focus was on a high-level overview of control planes and scaling components. This piece delves into hot partitions, which occur when a single piece of a system experiences disproportionate traffic, despite well-provisioned infrastructure. This issue lies at the heart of load balancing and routing, which are more important than load balancers themselves, especially in distributed systems.

For a simple web application, load balancing can be achieved using DNS-based load balancing, where multiple A records point to different IPs, and clients or resolvers distribute requests across them. However, this approach is coarse-grained, providing little control over traffic distribution, and has limited real-time awareness of backend health. Health checks with DNS providers can help identify unhealthy IPs, but they come at a cost and have no global view of the system.

A dedicated load balancer or proxy, such as an ALB, NLB, nginx, or Envoy, can be placed in front of the fleet, actively health-checking backends and routing each connection or request according to an algorithm. For stateless, interchangeable backends, this approach covers most of the load balancing needs. However, this model falls short when backends are not stateless and interchangeable, as the routing decision must be coupled to where the data lives, which is a placement problem rather than a traffic-distribution problem.

Placement strategy becomes load balancing in advance when creating a new table or dataset in a system like Cassandra. The control plane decides how partitions get distributed and replicated across the fleet. An improper placement strategy can create imbalances even before any request arrives. Good placement strategies aim to spread partitions evenly across available hosts, respect replication and fault-domain constraints, and account for heterogeneous hardware.

Despite a well-designed placement strategy, hot partitions can still occur. This happens when traffic to specific keys is wildly uneven due to a poorly chosen partition key. Detecting and correcting for hot partitions requires per-partition metrics, threshold models to distinguish overloaded partitions from normal variance, and attribution to know which keys within a partition drive the load.

Corrective actions, such as re-partitioning live, are delicate operations that the control plane must perform carefully to avoid outages.

Written by urgent.news from HackerNoon's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at hackernoon.com →

More in Tech

Mavericks Star Guard Lands on Injury Report vs. Jazz

Just when Mavericks fans thought the injury worries were behind them, a new update landed hours before the Jazz game.

  • Kyrie Irving listed as probable for Mavericks vs. Jazz
  • Injury due to illness, not recent performance issues
  • Mavericks face Jazz at 8 p.m. ET at American Airlines Center

Ad Pulse Lab

Ad Pulse Lab: Webcam Pulse and Breathing Next to What Viewers Say This is a submission for the Presage SmartSpectra SDK Challenge What I Built Ad Pulse Lab is an Electron desktop app for a consented…

  • Ad Pulse Lab is an Electron desktop app.
  • Measures pulse and breathing via webcam.
  • Developed for Presage SmartSpectra SDK Challenge.

Why I’m Starting a City-by-City Review of Software Companies in the US

A tech reviewer’s attempt to look beyond generic agency lists and understand how software companies actually differ by market, technical capability, and project fit.

  • Reporter embarks on city-by-city review of US software companies
  • Examines market focus, technical ability, and project suitability
  • First city featured is Houston, with subsequent articles for Austin to San Diego

More from Friday 6 November →