bagelhole/devops-security-agent-skills/load-balancing
Claude Code and agent skill by bagelhole/devops-security-agent-skills
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Configure load balancers and traffic distribution. Implement health checks and SSL termination. Use when distributing traffic across servers.
Install
npx vskill@latest install bagelhole/devops-security-agent-skills/load-balancingSKILL.md
Load Balancing
Distribute traffic across application servers for high availability, scalability, and fault tolerance.
When to Use
- Distributing HTTP/HTTPS traffic across multiple backend servers.
- Implementing health checks to route around unhealthy instances.
- Terminating TLS at the load balancer for simplified certificate management.
- Enabling blue/green or canary deployments with traffic shifting.
- Scaling horizontally behind a single entry point.
Prerequisites
- Two or more backend servers running the same application.
- TLS certificate for HTTPS termination (ACM, Let's Encrypt, or self-signed for internal).
- For AWS: VPC with public and private subnets across availability zones.
- For nginx/HAProxy: Linux server with root access.
nginx Load Balancer
Basic Round-Robin
Weighted and Backup Servers
Health Checks (nginx Plus / OpenResty)
Sticky Sessions (IP Hash)
HAProxy Configuration
Full Production Config
HAProxy Management
AWS Application Load Balancer (ALB)
Create ALB via CLI
Check Target Health
AWS Network Load Balancer (NLB)
ALB with Terraform
Load Balancing Algorithms
| Algorithm | Use Case | nginx | HAProxy | |
|---|---|---|---|---|
| Round Robin | Default, equal servers | (default) | balance roundrobin | |
| Least Connections | Uneven request durations | least_conn | balance leastconn | |
| IP Hash | Session persistence without cookies | ip_hash | balance source | |
| URI Hash | Cache locality per URL | hash $request_uri | balance uri | |
| Random with Two | Large server pools | random two least_conn | balance random(2) |
Troubleshooting
| Symptom | Cause | Fix | |
|---|---|---|---|
| All backends show "unhealthy" | Health check path returns non-200 | Verify /health endpoint returns 200; check security groups | |
| 502 Bad Gateway | Backend not running or wrong port | Confirm backend is listening on the configured port | |
| Uneven traffic distribution | Sticky sessions or weighted config | Check session affinity settings; review server weights | |
| Connection timeouts | Backend too slow or timeout too low | Increase proxy_read_timeout or HAProxy timeout server | |
| TLS handshake failures | Certificate mismatch or expired cert | Verify cert matches the domain; renew if expired | |
| ALB returns 503 | No healthy targets registered | Check target group health; verify targets are in correct subnets | |
| WebSocket disconnects | Proxy not configured for upgrades | Add proxy_set_header Upgrade and Connection "upgrade" |
Related Skills
- reverse-proxy - Reverse proxy configuration patterns
- dns-management - DNS records pointing to load balancers
- cdn-setup - CDN in front of load balanced origins
- service-mesh - Service-level load balancing in Kubernetes
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinginfrastructure/networking/load-balancing/SKILL.md
Popularity
- Repository stars
- 18
- Repository forks
- 2
- 7-day trend score
- 15
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 4 Apr 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bagelhole/devops-security-agent-skills/load-balancing)