Load Balancer Setup

Load Balancer Setup

Guides a coding agent in configuring load balancers (HAProxy, AWS ALB/NLB) for traffic distribution, sticky sessions, health checks, TLS termination and high availability.

Skill files7 files

references/

scripts/

templates/

SKILL.md100 lines
1
---
2
name: load-balancer-setup
3
description: >
4
Configure and deploy load balancers (HAProxy, AWS ELB/ALB/NLB) for
5
distributing traffic, session management, and high availability.
6
---
7
8
# Load Balancer Setup
9
10
## Table of Contents
11
12
- [Overview](#overview)
13
- [When to Use](#when-to-use)
14
- [Quick Start](#quick-start)
15
- [Reference Guides](#reference-guides)
16
- [Best Practices](#best-practices)
17
18
## Overview
19
20
Deploy and configure load balancers to distribute traffic across multiple backend servers, ensuring high availability, fault tolerance, and optimal resource utilization across your infrastructure.
21
22
## When to Use
23
24
- Multi-server traffic distribution
25
- High availability and failover
26
- Session persistence and sticky sessions
27
- Health checking and auto-recovery
28
- SSL/TLS termination
29
- Cross-region load balancing
30
- API rate limiting at load balancer
31
- DDoS mitigation
32
33
## Quick Start
34
35
Minimal working example:
36
37
```conf
38
# /etc/haproxy/haproxy.cfg
39
global
40
log stdout local0
41
log stdout local1 notice
42
maxconn 4096
43
daemon
44
45
# Security
46
tune.ssl.default-dh-param 2048
47
ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256
48
ssl-default-bind-options ssl-min-ver TLSv1.2
49
50
defaults
51
log global
52
mode http
53
option httplog
54
option denylogin
55
option forwardfor
56
option http-server-close
57
58
# Timeouts
59
timeout connect 5000
60
timeout client 50000
61
timeout server 50000
62
63
// ... (see reference guides for full implementation)
64
```
65
66
## Reference Guides
67
68
Detailed implementations in the `references/` directory:
69
70
| Guide | Contents |
71
|---|---|
72
| [HAProxy Configuration](references/haproxy-configuration.md) | HAProxy Configuration |
73
| [AWS Application Load Balancer (CloudFormation)](references/aws-application-load-balancer-cloudformation.md) | AWS Application Load Balancer (CloudFormation) |
74
| [Load Balancer Health Check Script](references/load-balancer-health-check-script.md) | Load Balancer Health Check Script |
75
| [Load Balancer Monitoring](references/load-balancer-monitoring.md) | Load Balancer Monitoring |
76
77
## Best Practices
78
79
### ✅ DO
80
81
- Implement health checks
82
- Use connection pooling
83
- Enable session persistence when needed
84
- Monitor load balancer metrics
85
- Implement rate limiting
86
- Use multiple availability zones
87
- Enable SSL/TLS termination
88
- Implement graceful connection draining
89
90
### ❌ DON'T
91
92
- Allow single point of failure
93
- Skip health check configuration
94
- Mix HTTP and HTTPS without redirect
95
- Ignore backend server limits
96
- Over-provision without monitoring
97
- Cache sensitive responses
98
- Use default security groups
99
- Neglect backup load balancers
100

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…