load-balancing-patterns

load-balancing-patterns is a skill for Claude Code from ancoleman/ai-design-components. It costs 51 tokens per session (3,429 once invoked), scanned A, original, MIT.

A guide to sharing incoming requests across multiple servers or regions. It covers choosing a load balancer, which directs traffic to available servers, and configuring health checks and session handling.

In plain words
What is it for?
Use it when setting up traffic routing for applications, Kubernetes deployments, multi-region systems, failover, or deployments that need little or no downtime.
Why use it?
It helps prevent one server from becoming overloaded and supports continued service when a server or region fails.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the infrastructure-skills plugin — 12 skills shipped together

Good fit Use it when setting up traffic routing for applications, Kubernetes deployments, multi-region systems, failover, or deployments that need little or no downtime.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ancoleman/ai-design-components/load-balancing-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ancoleman/ai-design-components --skill load-balancing-patterns
Clone the repo
git clone --depth 1 https://github.com/ancoleman/ai-design-components

Made for: Claude Code.

Or install infrastructure-skills, the plugin that ships this one along with the rest of its 12 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for load-balancing-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/ancoleman/ai-design-components/load-balancing-patterns/github.svg)](https://agentmods.dev/skills/ancoleman/ai-design-components/load-balancing-patterns)
Your own site
<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/load-balancing-patterns"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/load-balancing-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for load-balancing-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/load-balancing-patterns"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/load-balancing-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,429 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.03429
Opus 5.5 $0.00020 $0.01372
Sonnet 5.5 $0.00010 $0.00686
Haiku 4.5 $0.00005 $0.00343

Measured 1mo ago against content hash ce2cb71d4c97, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

load-balancing-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/load-balancing-patterns/SKILL.md · 442 lines

How it starts

The opening of the file, as written. The whole thing — 442 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Load Balancing Patterns

Distribute traffic across infrastructure using the appropriate load balancing approach, from simple round-robin to global multi-region failover.

When to Use This Skill

Use load-balancing-patterns when:

  • Distributing traffic across multiple application servers
  • Implementing high availability and failover
  • Routing traffic based on URLs, headers, or geographic location
  • Managing session persistence across stateless backends
  • Deploying applications to Kubernetes clusters
  • Configuring global traffic management across regions
  • Implementing zero-downtime deployments (blue-green, canary)
  • Selecting between cloud-managed and self-managed load balancers

Core Load Balancing Concepts

Layer 4 vs Layer 7

Layer 4 (L4) - Transport Layer:

  • Routes based on IP address and port (TCP/UDP packets)
  • No application data inspection, lower latency, higher throughput
  • Protocol agnostic, preserves client IP addresses
  • Use for: Database connections, video streaming, gaming, financial transactions, non-HTTP protocols

Layer 7 (L7) - Application Layer:

  • Routes based on HTTP URLs, headers, cookies, request body
  • Full application data visibility, SSL/TLS termination, caching, WAF integration
  • Content-based routing capabilities
  • Use for: Web applications, REST APIs, microservices, GraphQL endpoints, complex routing logic

For detailed comparison including performance benchmarks and hybrid approaches, see references/l4-vs-l7-comparison.md.

Load Balancing Algorithms

Algorithm Distribution Method Use Case
Round Robin Sequential Stateless, similar servers
Weighted Round Robin Capacity-based Different server specs
Least Connections Fewest active connections Long-lived connections
Least Response Time Fastest server Performance-sensitive
IP Hash Client IP-based Session persistence
Resource-Based CPU/memory metrics Varying workloads

Read the full file on GitHub · 442 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 442 lines · 51 tokens per session scan A ce2cb71d4c97

Subscribe to this mod's changes

load-balancing-patterns is a skill published in the GitHub repository ancoleman/ai-design-components (524 stars, last pushed 10mo ago), licensed MIT. It adds 51 tokens to every session and 3,429 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

form-strategy

Design forms that convert, validate well, resist spam, and integrate cleanly with downstream systems. Use this skill when designing or auditing any form (contact, signup, checkout, multi-step, embedded), planning validation logic, fighting spam, choosing form tooling, or improving form conversion. Triggers on form…

rampstackco/claude-skills · 107 tokens

mcp-server-builder

Use to build, wire up, or debug an MCP (Model Context Protocol) server that gives Claude access to an internal API, database, or SaaS tool. Trigger when the user wants Claude to connect to their own system, asks for an MCP server, needs custom tools for Claude Code or the Claude app, or an existing server's tools are…

OneWave-AI/claude-skills · 79 tokens

api-endpoint-scaffolder

Generate REST API endpoints with proper structure, validation, error handling, and types. Use when creating new API routes, endpoints, or backend services.

OneWave-AI/claude-skills · 36 tokens

netlify-development

Best practices for building and deploying Netlify sites, covering serverless and edge functions, Netlify Blobs storage, the Image CDN, and build configuration. Use when writing Netlify Functions or Edge Functions, configuring netlify.toml or redirects/headers, managing environment variables across deploy contexts…

Mindrally/skills · 78 tokens

apollo-graphql

Guidelines for developing GraphQL APIs and React applications using Apollo Client for state management, data fetching, and caching.

Mindrally/skills · 26 tokens

clerk-authentication

Guidelines for implementing Clerk authentication in Next.js applications with middleware, hooks, and security best practices.

Mindrally/skills · 24 tokens