Three learners review open books together at a classroom table, with stacks of textbooks, stationery and a whiteboard in the bright room.

What is a Load Balancer? | Server Traffic, Algorithms, Health Checks and Reliability

Introduction: why one address can represent many computers

Did you know that a website can present one familiar address while hundreds of computers perform the work behind it? A load balancer is a network or software component that distributes incoming connections or requests among eligible backend systems. It helps a service use capacity efficiently, avoid overloading one machine and continue operating when particular servers become unavailable. This guide explains what load balancing means, how load balancing algorithms work, why health checks matter and how high-availability web infrastructure is designed.

A load balancer may sit between users and application servers, between applications and databases, or at another carefully defined boundary. Some decisions occur at transport-layer connection level, while others inspect HTTP requests. Load balancing is connected to reverse proxies, traffic routing, server pools, latency, throughput, scaling and fault tolerance, but it is not identical to any of those concepts.

The central mental model is a queue of incoming work and a set of workers with limited processing capacity. Each request has a destination, a resource cost and a result. The load balancer chooses an eligible worker using rules and current information. Whether the whole service succeeds depends not only on that choice but also on the workers, shared data stores, network links and application behaviour. Follow these parts in order and the technology becomes a set of understandable decisions rather than a mysterious black box.

First principle: one server has finite capacity

A server has finite CPU time, memory, storage throughput, network bandwidth and access to downstream services. It can perform several tasks concurrently, but concurrency is not free. More incoming requests create work that must be scheduled, processed and answered. If arrivals exceed sustainable processing capacity for long enough, waiting requests accumulate or the service rejects work. A load balancer cannot manufacture spare CPU cycles; it can steer work to capacity that exists elsewhere.

Imagine a bakery with one skilled worker and a line of customers. Adding a second worker may reduce queues if they can use separate ovens and supplies. Yet if both workers depend on one tiny oven, the total output may remain limited. This analogy describes why distributing requests among application servers helps only when the rest of the system can support the extra activity. Database connections, locks, remote APIs, payment processors and network bottlenecks often determine the true capacity.

Second principle: route a request to an eligible backend

The simplest design has a client, a service entry point, and a group of backend servers. The client sends traffic to the public address. The load balancer accepts or forwards the traffic according to its configuration and chooses a backend from a defined pool. The backend performs the requested work and returns a response, possibly through the same balancing component. From the client’s viewpoint, there may be one service even though the internal worker changes.

Eligibility is the first requirement. A backend may be marked unavailable, undergoing maintenance, outside the intended geographic pool or incompatible with a request. A routing policy should choose only appropriate candidates. Selection among healthy candidates is the second requirement. The method might cycle through them, choose the least busy according to a proxy measure or use a hash to keep related connections together. Eligibility and selection are separate decisions; confusing them makes operational troubleshooting harder.

Traffic can be a connection, not just a page view

People often picture a load balancer counting complete webpages, but modern services exchange many kinds of units. One browser page can request HTML, scripts, images, stylesheets, API responses and streaming updates. A single HTTP connection may carry multiple requests, and some protocols multiplex streams. Conversely, one request can cause lengthy backend computation or a database transaction. Counting page views, TCP connections and HTTP requests therefore produces different numbers.

Layer 4 balancing usually considers transport information such as destination address, port and connection properties. Layer 7 balancing can use application-layer information including the HTTP path, host name, method and selected headers. Neither classification alone guarantees a particular feature set. A specific implementation determines which routing controls, health checks, protocol versions and observability capabilities are available. When someone says they need a load balancer, ask what traffic unit and protocol they intend to balance before choosing a product or configuration.

What a reverse proxy adds

A reverse proxy receives requests on behalf of backend services. It can conceal private backend addresses, maintain upstream connections, apply access rules, collect logs, handle certificates, cache certain responses or rewrite headers. Load balancing is one possible reverse-proxy function: choosing among several backend destinations. A reverse proxy with only one backend may not be balancing any load. A balancing system might also operate using mechanisms other than a conventional full HTTP reverse proxy.

Think of a hotel’s reception desk. The desk is the public-facing point that routes visitors to rooms or departments and enforces check-in procedures. The act of selecting a department resembles balancing; identity checking, directions and recordkeeping resemble other proxy duties. The analogy helps explain why buying a reverse proxy does not automatically deliver resilient infrastructure. The surrounding architecture, configuration and backend health still matter.

Round robin: an understandable starting algorithm

In round-robin balancing, consecutive requests are assigned across eligible backends in an ordered cycle. With three equally weighted servers A, B and C, a simple sequence may be A, B, C, A, B, C. This tends to distribute request counts evenly when requests have similar costs and the servers have comparable capabilities. It is easy to reason about and requires relatively little dynamic information.

Round robin does not necessarily divide computational work evenly. A request that reads one small record may finish in milliseconds, while another generates a complicated report. If expensive requests fall disproportionately on one backend, equal request counts can produce unequal utilisation and response time. Connection reuse and application semantics also affect how a real implementation distributes work. The rule is an algorithmic starting point, not a promise of perfect fairness. NGINX documents round robin as a standard HTTP load-balancing method and explains other policies for different circumstances.

Weighted routing: when servers are not equally powerful

Backend pools often contain machines with different capacities. Weighted distribution can assign more requests to a stronger server. Suppose one server has a nominal routing weight of two and another has weight one. Over a sufficiently large run of comparable requests, the intended allocation is approximately two-thirds to the first and one-third to the second. For 900 similar requests, that means about 600 versus 300, subject to implementation details and timing.

A weight is a scheduling preference, not a measurement of how much useful work a machine actually performed. If the stronger server experiences disk contention or a software problem, its nominal capacity estimate becomes unreliable. Operators should revisit weights when instance sizes, workloads and downstream bottlenecks change. They should also avoid mistaking weight two for a requirement that every individual pair of requests must go to the stronger host. Weighted algorithms manage aggregate distribution, not an exact deterministic proportion in every tiny sample.

Least connections: balancing occupied worker slots

Least-connections routing directs new connections toward a backend with fewer active connections, often accounting for weights when configured. It can be helpful when connection durations vary. Imagine one server is already handling several long-running uploads while another is idle. A simple request-count cycle may assign more work to the busy server, whereas least-connections can favour the less occupied alternative.

Connection count is still a proxy, not a universal measure of cost. One idle connection may use little CPU while one active computation consumes an entire core. Modern protocols can multiplex work within connections, so connection count may not match request concurrency. Some implementations measure current load locally to a worker process unless shared state is enabled. The documented NGINX least-connected algorithm illustrates both the benefit and the limits: it responds to connection occupancy, not directly to a perfect prediction of the next request’s resource demand.

Hash routing and session affinity

Hash-based algorithms convert a chosen key into a routing decision. The key might be a client identifier, source address, cookie or another application-defined value. This can keep related requests directed toward the same backend, a property often called affinity or sticky sessions. In applications where session state lives only in one server’s memory, affinity may reduce the chance of a request arriving at a different server that lacks that state.

The trade-off is fragility and unevenness. A highly active client can overload its assigned server, and a backend failure can break in-memory sessions despite sticky routing. IP-address hashing can also group many unrelated people behind one shared public address. Designing applications with shared or externally stored session state usually allows more freedom to route work across healthy servers. Use affinity only when there is a reason for it, and document how reassignment works when servers join, leave or fail.

Consistent hashing and disruption during scaling

Ordinary hashing can send a large fraction of keys to different servers when the pool size changes, depending on the method. For caches or stateful services, that reshuffling may generate expensive misses and migrations. Consistent hashing aims to reduce unnecessary remapping when nodes are added or removed. It does not mean that every key is forever tied to the same host, and it does not automatically balance computational effort under skewed key popularity.

Imagine a library system where books are assigned to storage rooms according to their identifiers. Rebuilding the entire allocation after opening one room would be disruptive. A well-designed reassignment method moves a smaller subset of books while leaving many others where they are. That principle motivates consistent hashing in distributed caches and certain storage systems. For a stateless web frontend, however, a simpler algorithm may work perfectly well. Algorithm sophistication should match the actual problem.

Random choice and the power of alternatives

Random load distribution is sometimes attractive because it avoids maintaining an exact global ordering and can be implemented across distributed decision makers. Simple random placement may produce short-term unevenness, especially with few requests. A common refinement samples a small number of eligible servers and chooses the apparently better one based on a metric such as active connections. This can reduce hotspots without interrogating the entire pool for every assignment.

The design lesson is not that one exotic algorithm always beats round robin. Algorithms trade complexity, state freshness, consistency, fairness and adaptation. If every request costs roughly the same and all servers are identical, simple selection may be adequate. If workloads vary, a metric-sensitive strategy can improve distribution, provided the metric actually reflects the resource being exhausted. Benchmarking should use representative work rather than synthetic requests that hide the real bottleneck.

Worked example: sizing a pool with capacity and failover

Suppose a service expects a steady arrival rate of 150 requests per second. A measured backend instance can sustainably complete 60 requests per second for this workload while meeting its performance objective. Three identical instances provide a nominal total capacity of 3 × 60 = 180 requests per second. At 150 requests per second, average utilisation relative to that measured maximum is 150 / 180 = 0.8333, or about 83.3 percent, assuming reasonably even distribution and no additional bottleneck.

Now consider one server failing. The remaining two could sustain only 2 × 60 = 120 requests per second under the same conditions. Demand would exceed that capacity by 30 requests per second. If arrivals remain constant and unserved requests are queued indefinitely, the backlog could grow by approximately 30 requests each second, or 1,800 after a minute. Real systems may reject, time out or shed excess work before such a queue develops. Add a fourth identical instance and total nominal capacity becomes 240. After losing one, three remain with 180 capacity, providing the original 150 demand with 30 requests per second of headroom. This is a simple N+1-style capacity thought experiment, not a guarantee: real service times fluctuate, failures can be correlated and safe operating headroom may need to be larger.

Why 83 percent utilisation is not a universal safety threshold

The worked example expresses demand as a fraction of measured sustainable capacity, but it does not establish an industry-wide rule for acceptable utilisation. Queues and response-time variability depend on arrival patterns, service-time variation, worker concurrency, burst handling and the system’s architecture. A cluster averaging 60 percent utilisation might still experience timeouts during sharp bursts or while waiting for one locked database row. Another system with well-controlled workloads might operate closer to its measured capacity without violating objectives.

Capacity planning should therefore use measurements from representative loads. Record throughput, latency percentiles, errors, queue lengths, CPU, memory, disk waits and downstream response times. Test not only the usual case but also a failed node, a sudden traffic spike and a dependency slowdown. A calculated request-per-second maximum is useful as a model only when its assumptions are visible and checked against reality.

Health checks: refusing to send work to a broken backend

A load balancer needs a way to identify failed or degraded backends. Passive health checking observes actual traffic outcomes, such as failed connections or certain upstream errors, and can temporarily stop routing to problematic instances. Active health checking sends dedicated probes to a configured endpoint and evaluates the response against specified conditions. Products and editions differ in which mechanisms they support. For example, NGINX documentation distinguishes passive checking supported by NGINX Open Source from certain active probing features in NGINX Plus.

A successful network connection does not necessarily mean an application is ready. A process might accept TCP connections while its database access is broken or its required configuration is missing. Probe design therefore matters. A shallow liveness probe asks whether the process is running; a readiness probe asks whether it can reasonably handle intended work. Overly expensive probes can themselves consume resources, while overly simplistic probes miss meaningful failures. Health is always health for a defined purpose.

Active and passive checking should be complementary

Passive checking has the advantage of reflecting real requests, but the service may need to experience failures before unhealthy hosts are excluded. Active checking can detect certain problems without requiring a user to encounter them, yet a synthetic probe may not reproduce an application’s normal workload. A server that returns success for a simple endpoint might still fail on expensive report generation or writes requiring a database transaction.

Recovery also requires care. Routing full traffic immediately to a newly recovered server may overload cold caches or a freshly restarted process. Some systems use thresholds, cooldown periods, gradual ramp-up or slow-start mechanisms to introduce traffic safely. Operators should specify how many failing probes mark a host unhealthy, how many successful probes restore it and how recovered capacity is introduced. Treating probe settings as insignificant defaults can create rapid oscillation between available and unavailable states.

Failover: a working replacement needs enough capacity

Failover means traffic can be directed away from an unavailable component toward another eligible component. Merely owning a spare server is not sufficient. The balancer must detect the failure, reach the spare, and supply enough remaining capacity to meet demand. Session state and data access must also survive the switch. A second instance depending on the same broken database is not an independent recovery route.

Consider two web servers behind one balancer. If both rely on a single power supply, a single storage service or one shared network path, the architecture contains failure modes that affect both. High availability is about reducing single points of failure across the whole request path. This can include redundant balancers, network routes, application workers and data services, with carefully tested behaviour when dependencies fail. More servers can improve resilience, but resilience is not simply the number of server icons in an architecture diagram.

Why the load balancer itself can be a bottleneck

If every request must pass through one appliance or process, that entry point has its own limits: packet processing capacity, connection table size, TLS work, memory, network interface speed and configuration complexity. It may also represent a single point of failure. Operators can deploy redundant instances, managed highly available services, distributed routing layers or regional entry points, depending on the environment.

Redundancy does not mean no engineering work remains. Traffic must shift when a balancer fails, certificates and rules must be consistent, and clients may continue using stale addresses for a while. Monitoring should cover not only backend health but also the entry layer’s resource use and decision correctness. A reliable system measures the entire path rather than judging success because the backend dashboard is green.

DNS steering is not identical to per-request balancing

Domain Name System resolution translates a service name into addresses. A DNS-based steering system may return different destinations depending on region, policy or health, helping users reach suitable service entry points. Once a client has cached an answer, however, later DNS changes may not immediately affect its current connection. Resolvers, operating systems and applications all have behaviours that influence how quickly new answers take effect.

A per-request HTTP balancer can choose a different backend on each eligible new request or connection according to its algorithm. DNS steering may instead influence which front door a client approaches. Large services sometimes use both, combining coarse-grained regional distribution with fine-grained balancing inside a region. Confusing the two leads to incorrect expectations about failover speed and session stability. Always ask at which layer the routing decision occurs and how long that decision is retained.

Layer 4 versus Layer 7 in everyday terms

At the transport layer, a balancing component can route by connection properties without needing to understand an HTTP URL. It might serve applications that use TCP or UDP in ways unrelated to webpages. At the application layer, an HTTP-aware balancer can send requests for one path to a catalogue service and another path to an account service. It can sometimes attach or preserve headers and apply richer policies informed by the request content.

The higher layer provides more context but may require additional parsing, processing and security configuration. End-to-end encryption, protocol support and the need to preserve client details all influence design. Do not infer that Layer 7 is automatically faster or that Layer 4 is automatically more secure. The appropriate layer depends on whether the application needs content-aware routing, how traffic is encrypted and how much operational complexity the organisation can support.

TLS termination and the boundaries of trust

Transport Layer Security protects traffic over a network connection. A load balancer may terminate TLS by decrypting incoming traffic, applying HTTP routing logic, and then forwarding it to backends through another protected or otherwise controlled connection. Alternatively, some balancing configurations pass encrypted traffic through without examining its application contents. Both patterns can be legitimate when matched to threat models and application requirements.

If TLS ends at the balancer, the path onward still needs an explicit security design. The organisation should decide whether to re-encrypt traffic, which certificates to trust, how to restrict access to backend ports and how to manage secrets. A proxy may add headers that identify the original client or original protocol; application code must only trust such headers when they come through an authorised proxy chain. Accepting spoofed forwarding headers from arbitrary users can compromise access controls and audit logs.

Session state: why round robin may expose hidden assumptions

Suppose a login application stores each user’s temporary session exclusively in the memory of whichever web server first handled the request. A subsequent request may be sent to another healthy server that has no record of that session. The user appears to have been logged out even though neither server has failed. A sticky routing policy may mask the problem, but a restart or rebalance can still interrupt the session.

A more flexible design keeps required session state in a suitable shared store or uses carefully secured stateless tokens where appropriate. The choice depends on confidentiality, revocation, size, freshness and operational constraints. Load balancing forces architects to recognise which data are local to a machine and which must be visible across instances. Systems that scale cleanly usually make these state boundaries explicit instead of assuming every user always visits one process.

Long-lived connections and streaming applications

WebSocket and other streaming connections can stay open much longer than short ordinary requests. Once a connection is established through a balancing layer, its association with a backend may persist while messages continue flowing. Algorithms based on active connections can react differently to this workload than to one-off page requests. A backend with many quiet connections may be healthy, while another with fewer connections is saturated by intensive message processing.

Deployment and recovery plans must account for connection draining, reconnect behaviour and client-side retries. Closing thousands of long-lived sessions simultaneously can produce a surge of reconnection attempts, which may overload the replacement capacity. A graceful rollout often removes an instance from accepting new work while allowing existing sessions time to finish or transfer appropriately. The precise mechanics depend on the protocol and application, so design tests must use genuine connection lifetimes rather than only brief HTTP benchmarks.

Caching and balancing solve different bottlenecks

A cache stores reusable results so future requests can avoid repeating expensive work. A load balancer directs work to capable destinations. A reverse proxy or content delivery network might perform both functions, but the concepts remain distinct. If an image can be served safely from a nearby cache, the origin server may receive far fewer requests. If each request still requires fresh personalised computation, balancing distributes the necessary work rather than eliminating it.

Caching introduces validity and freshness questions. A stale record can be wrong even when the response is fast. Balancing introduces routing and availability questions. A perfectly current response is useless if no healthy backend receives the request. Readers can explore the difference further in What is a Cache?. Together, caching and balancing can improve service efficiency, but each needs independent correctness conditions.

Load balancing versus autoscaling

Load balancing spreads requests among a current set of servers. Autoscaling changes the size or resources of that set in response to policies or observed conditions. When demand grows, an autoscaler may start more application instances. The balancing system then needs to recognise the new healthy instances and gradually direct work toward them. When demand falls, capacity may be retired without interrupting active requests.

Autoscaling is not instantaneous. Booting a virtual machine, warming application caches, establishing database connections and passing readiness checks can all take time. Sudden bursts may require pre-provisioned headroom or proactive scheduling. If a downstream database cannot scale similarly, adding frontend replicas may increase pressure on the shared bottleneck. A good design coordinates capacity, routing, application state and dependencies instead of treating scaling as a button that always makes a system faster.

Regional routing and geographic distribution

A global service may operate in several data-centre regions. A higher-level entry mechanism can direct users toward a region based on network conditions, service availability, policy or geography, after which regional load balancers distribute traffic among local instances. Geographic closeness is useful but does not always predict the lowest latency because network routes, congestion and application dependencies matter.

Cross-region failover adds data considerations. A user may reach a healthy application server in another country, but the required data might be delayed, subject to residency rules or unavailable because the database did not replicate correctly. Strong consistency, eventual consistency, failover recovery points and regulatory requirements can change the appropriate routing decision. Global traffic control is therefore a combination of networking, data engineering and governance, not merely drawing arrows between cities.

Observability: evidence that traffic is really balanced

Operators need metrics to understand whether a balancing policy achieves its purpose. Useful measurements include request and connection rates per backend, queue lengths, active connections, response-time percentiles, upstream error rates, retry volumes, health-check status and the number of eligible instances. Logs and distributed traces can show where a slow request spent its time. Averages alone may hide severe delays affecting a small but important portion of users.

Traffic distribution should be compared with expected capacity, not just equal percentages. Weighted pools should not necessarily show equal counts. A few large requests can account for much more work than many small ones. Observability also needs labels and reliable time synchronisation so that a request can be traced across the frontend, balancer, application and database. If the monitoring system cannot tell whether delay occurred in the balancer or in a downstream service, optimisation risks targeting the wrong layer.

Retries and why doing the same operation twice can be dangerous

Load balancers and clients sometimes retry requests after timeouts or failures. Retrying a safe read may be straightforward, but repeating a money transfer, order submission or account mutation can create duplicate effects if the first request actually succeeded and its response was lost. Network uncertainty means the caller may not know whether an upstream completed the operation before the connection broke.

Applications that accept important changes can use idempotency keys, transaction records and carefully designed retry semantics to avoid unintended duplication. Operators also need to limit retries so a partial outage does not multiply traffic and overwhelm surviving servers. A load balancer should not be treated as an oracle that knows whether an uncertain write committed. Correctness often requires cooperation between the client, routing layer, application and database.

Security: a front door is not a complete security strategy

Because a balancing component is frequently a public-facing entry point, it is a convenient place to enforce certain connection limits, filtering policies or web-application protections. But a load balancer by itself does not guarantee protection against every attack. Backend access controls, authentication, secure application code, credential management, patching, network segmentation and monitoring remain necessary.

Even the routing policy can have security implications. If a client can choose an arbitrary backend through unvalidated headers, they may bypass intended separation. If source addresses are misinterpreted behind proxies, rate limits may be applied to the wrong user. And if large traffic floods saturate network links upstream of the balancer, local software controls may not prevent disruption. A good threat model traces who can send traffic, what each layer trusts and how overload is handled before the backend receives work.

Load shedding and graceful degradation

When arrivals exceed sustainable capacity, simply queuing every request can increase delays until many clients time out and retry. Load shedding intentionally rejects or defers lower-priority work so the system can preserve more valuable functions. Graceful degradation might temporarily disable nonessential recommendations while continuing to serve sign-in or account information. These policies require application knowledge, not just a generic routing algorithm.

For example, an educational website may prioritise submitting students’ answers over refreshing decorative dashboards during a sudden peak. Requests can have different deadlines and consequences. An explicit overload policy states which work may be refused, what error is returned, how clients should retry and what evidence triggers recovery. The lesson is that reliability sometimes requires choosing not to accept additional work when accepting it would make the service fail more widely.

Blue-green deployments and draining old servers

Software updates can be rolled out behind a load balancer by placing the new version on a separate set of backend instances, verifying its readiness and then shifting controlled amounts of traffic. Blue-green deployments are one possible pattern. Canary rollouts send a smaller share to the new version while monitoring for unexpected errors. These techniques reduce the risk of switching every user to untested software in one moment.

However, routing between versions is not enough if the versions are incompatible with database schemas, cookies or shared state. An update that changes an API contract may require coordination between services. Draining old connections and providing a rollback path also matter. The load balancer is a useful control point for releases, but the software and data have to be designed for overlapping versions and safe transitions.

How to diagnose a slow website from first principles

Start with an observation: users report that some requests are slow. Determine whether the problem affects all requests or only particular paths, geographic regions or account types. Check whether the balancing layer can reach the backends and whether health probes are stable. Compare per-backend response times and utilisation; if one backend is unusually slow, investigate its CPU, memory, storage, dependencies and recent changes.

If every backend slows at the same time, consider a shared database, external API, network path or traffic spike. If the balancer itself is saturated, examine its connection limits, packet processing, TLS workload and upstream routes. If errors begin after scaling, inspect session state, readiness checks and configuration consistency. A diagnostic sequence should narrow possibilities through evidence rather than conclude automatically that more servers are needed. Troubleshooting improves when each step tests a specific mechanism.

How to teach the concept without software

Give three students the role of backend servers and a fourth the role of load balancer. Hand the balancer task cards representing requests. Some cards should be quick to complete; others should take several actions. In round one, distribute cards strictly A, B, C in order. In round two, allow the balancer to inspect the number of unfinished tasks and choose the least occupied student. Compare completed work, waiting time and unevenness.

Then introduce a failure: one student stops processing. Observe whether the balancer notices and directs new cards elsewhere. Next introduce a shared bottleneck by allowing only one pencil for all three students. The demonstration reveals why extra workers can fail to increase total throughput. The model is deliberately simplified, but it teaches routing, capacity, variable service time, health and downstream limits. Students can translate the same principles into a web architecture diagram later.

Reader transfer: from servers to other systems

Load balancing is not a concept limited to websites. Call centres distribute callers among available agents; delivery operations allocate parcels among couriers; transport networks distribute passengers along routes; manufacturing lines assign work to machines with different capacities. In each case, define the incoming units of work, the eligible workers, their constraints and the selection rule. Then ask whether the routing decision creates a shared bottleneck or helps the system remain robust when one worker becomes unavailable.

The analogy also reveals limits. Humans, servers and vehicles do not have identical objectives, and an algorithm that optimises average completion time may violate fairness, safety or priority requirements. Recognising these differences is part of transferring the concept responsibly. Once you can explain a load balancer as a decision maker over constrained workers, you can evaluate unfamiliar systems without needing to memorise every product’s terminology.

FAQs: Is a load balancer the same as a router?

No. A router typically forwards packets toward network destinations based on routing information. A load balancer selects among service backends under a distribution policy, sometimes while acting as a reverse proxy. A real device or platform may perform several networking functions, but their logical roles differ.

FAQs: Does load balancing make one server faster?

It does not increase that server’s inherent computing capacity. It can improve service-level performance by moving work toward other available instances, avoiding a hotspot and supporting more total traffic if the rest of the system has sufficient capacity.

FAQs: What is the best algorithm?

There is no universal winner. Round robin is simple, least connections considers connection occupancy, weighted rules handle unequal capacity, and hashing can preserve affinity. Real workload measurements and application-state requirements should determine the choice.

FAQs: What happens when all backends fail?

The balancer has nowhere healthy to forward requests. It may return an error or use a separately designed fallback. High availability requires meaningful alternative capacity and healthy dependencies, not just a proxy in front of several broken servers.

FAQs: What is a health check?

It is a mechanism for evaluating whether a backend should receive traffic. Passive checks observe ordinary requests; active checks probe an endpoint. Their definitions, thresholds and supported features vary by system and edition.

FAQs: Are sticky sessions necessary?

Not always. Stateless or appropriately shared-session applications generally allow flexible routing. Affinity can help when a valid need for local session continuity remains, but it complicates failure handling and can skew loads.

FAQs: Can DNS load balance traffic?

DNS can steer clients toward different service addresses, but caching and resolver behaviour affect when changes take effect. It is different from a proxy selecting a backend for an individual incoming HTTP request.

FAQs: How many servers do I need?

Measure one instance’s sustainable capacity under representative load, estimate arrivals and bursts, include failure scenarios and allow headroom. The worked example shows why three 60-request-per-second servers may be inadequate for 150 requests per second after one fails, while four offer a simple nominal redundancy margin.

FAQs: Does a load balancer prevent DDoS attacks?

Not by itself. Some balancing platforms include traffic controls, but effective defence depends on network capacity, rate controls, upstream mitigation, application security and recovery practices. Routing alone does not neutralise malicious traffic.

FAQs: Is load balancing only for large companies?

No. Even a modest application may use two backend instances to reduce planned-maintenance disruption or isolate a failed machine. Simpler sites may not need a dedicated balancing layer at all; the decision should reflect traffic, reliability goals and operating costs.

Authoritative sources and connected lessons

For implementation-grounded reading, see NGINX: Using NGINX as an HTTP Load Balancer for round robin, least connections and IP hashing, plus NGINX HTTP Health Checks for passive and active checking distinctions. These are vendor’s own technical documents; actual products and editions must be checked against their documentation before configuration decisions.

For contextual lessons on this site, read What is a Data Packet? to follow the units transported by networks, and What is a Cache? to understand when reusing a result removes work altogether. This educational guide is not a substitute for testing an actual production deployment.

Explore the connected learning guides

Choose the question that brought you here. Open one useful guide, try a small task, and stop when you have what you need.

Take one question further

The same learning habit can travel across subjects, while each subject keeps its own methods. These routes help you notice a difficulty, understand one part of it, and return to something you can do.

A word is familiar, but using it is difficult.

Move from recognising a word to retrieving it in a new context. Understand vocabulary plateaus.

Try it without the guide: Choose one word you already know. Close the guide and use it in a new sentence. Explain why it fits; try another context tomorrow.

A piece of writing has ideas, but the reader loses the thread.

Make the order of events and the links between sentences clear. Explore composition writing.

Try it without the guide: Choose one short paragraph. Read the relevant explanation, close it, and revise the paragraph. Ask someone to tell you what happened and why.

The Mathematics seems familiar, but marks still disappear.

Find the first point where the working stops being reliable. Find Secondary 4 A-Math mark leakage.

Try it without the guide: For a Secondary 4 A-Math question you have attempted, locate the first uncertain line. Repair that step, then try a comparable question without the worked answer.

A Science fact is remembered, but the explanation is incomplete.

Connect the evidence to a scientific idea and the resulting change. Follow the Primary Science learning route.

Try it without the guide: Choose a familiar Primary Science example. Explain the evidence, the idea and the result without notes. Then change one condition and explain your prediction.

Two accounts of the world seem to disagree.

Check the question, source, date and evidence before combining claims. Explore the World Knowledge research library.

Try it without the guide: Take one claim. Find the source best placed to support it, note its date, and state what remains uncertain. Return to your original question.

There is plenty of help, but independence is hard to see.

Check what the learner can understand and do after support is removed. Understand how education works.

Try it without the guide: Choose one small task the child has practised. Agree on a calm, brief attempt without prompts. Use what happens to choose one next step, then stop.

For the structure behind these connections, read the eduKateSingapore runtime manifest and the eduKate ecosystem boot contract. The reader map describes public navigation; those manifests preserve the wider ownership and return rules.