Index of every page on this site: llms.txt
All skills
proyecto26 avatar

/load-balancing

@228d57d
Run it yourself

This skill should be used when the user adds a "load balancer", asks about "L4 vs L7" (transport vs application layer), picks a balancing algorithm ("round robin", "least connections", "weighted", "IP hash"), configures "health checks", needs "sticky sessions" / "session affinity", adds a "reverse proxy", does "SSL/TLS termination", spreads "traffic distribution" across an "autoscaling group", or wants a stateless web tier behind a single entry point. Use it whenever a design has more than one server behind one address, or a single box is the entry-point bottleneck or SPOF, even if the user doesn't say "load balancer".

Use this Skill: https://skilld.dev/gh/proyecto26/system-design-skills/load-balancing

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesprovidersgeneric.md

≈628 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Load balancing — generic / self-hosted

The vendor-neutral default. When no cloud is named, this is the answer.

What to run

  • HAProxy — battle-tested L4 and L7 proxy/balancer. Rich algorithms (round robin, least-conn, source hash), fine-grained health checks, slow-start, connection draining, TLS termination. The default for a dedicated software LB.
  • Nginx — web server + L7 reverse proxy + balancer; also does static serving, caching, compression, TLS termination. Great when the balancer and reverse-proxy roles are the same box. L4 (stream) module exists but is less full-featured.
  • Envoy — modern L4/L7 proxy built for dynamic service discovery, gRPC/HTTP2, observability, and outlier detection (passive ejection). The data plane behind most service meshes; pick it for dynamic fleets and rich telemetry.
  • Keepalived / VRRP — floats a virtual IP between two balancers for active-passive HA. IPVS/LVS — kernel-level L4 for very high throughput.

Topology

  • Single balancer only for non-critical/dev — it's a SPOF.
  • Active-passive: two balancers, a VIP moved by Keepalived/VRRP on failure (failover gap of seconds).
  • Active-active: multiple balancers behind DNS round robin or anycast/ECMP, or a small L4 tier (LVS) fronting an L7 tier (HAProxy/Envoy) for scale.

Limits / things that bite

  • A single instance is bounded by CPU (TLS + L7 parsing), open file descriptors / ephemeral ports, and NIC bandwidth — L7 termination is far heavier than L4 forwarding. Size against peak concurrent connections, not just QPS.
  • Health-check config is yours to get right: set failure/success thresholds, intervals, jitter, and slow-start explicitly or you'll flap or stampede recovering nodes (see deep-dive).
  • Connection draining/deregistration delay must be configured for graceful deploys/scale-in, or in-flight requests drop.
  • Backend discovery is on you: static config, DNS, or a registry (Consul/etcd) + reload. Stale targets get traffic until removed.

Pitfalls

  • One balancer with no standby — you reintroduced the SPOF.
  • TLS terminated at the LB but the internal hop left in plaintext when compliance requires encryption end-to-end (use re-encrypt/passthrough).
  • Default round robin on long-lived connections → uneven load (use least-conn).
  • Operating HA, certs, and observability yourself — heavier than a managed LB, but zero lock-in and full control. Use when self-hosting or for cloud portability.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts24d3 checks · Risk SAFE
  • Gen Agent Trust Hub24d

    The skill is a set of architectural guidelines and reference materials for load balancing strategies. It contains no executable code, remote downloads, or dangerous commands.

  • Socket24d

    No alerts

  • Snyk24d

    Risk: LOW · No issues

Signed by skilld at 228d57d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 4 weeks ago

README badge

README badge for proyecto26/system-design-skills/load-balancing