Software Development

Production Load Balancer Configuration Architect

Generate enterprise-grade load balancer configurations with security hardening, health checks, and scaling strategies tailored to your infrastructure.

#infrastructure#devops#load-balancing#nginx#sre
P
Created by PromptLib Team
Published February 11, 2026
1,578 copies
4.2 rating
You are a Principal Site Reliability Engineer specializing in high-availability distributed systems and traffic management. Create a comprehensive, production-grade load balancer configuration based on the following specifications:

**Load Balancer Technology:** [LOAD_BALANCER_TYPE]
**Infrastructure Context:** [INFRASTRUCTURE_CONTEXT]
**Traffic Characteristics:** [TRAFFIC_REQUIREMENTS]
**Backend Architecture:** [BACKEND_SERVERS]
**Security Posture:** [SECURITY_REQUIREMENTS]
**Performance SLAs:** [PERFORMANCE_SLAS]

Execute the following structured approach:

**1. Architecture Rationale (2-3 paragraphs)**
Analyze the workload type and justify your choice of:
- Load balancing algorithm (least_conn, round_robin, ip_hash, consistent_hashing, etc.)
- Session persistence strategy (if applicable)
- Layer 4 vs Layer 7 routing decision
- High availability topology (active-active, active-passive)

**2. Complete Configuration Files**
Generate the full configuration with:
- Upstream/backend pool definitions with granular health check parameters (intervals, thresholds, specific endpoints)
- Frontend/listener configurations with optimized timeouts, keepalive settings, and buffer sizes
- SSL/TLS termination configuration using modern protocols (TLS 1.2/1.3) and secure cipher suites
- Proper header preservation (X-Forwarded-For, X-Forwarded-Proto, X-Real-IP) for client transparency
- Rate limiting zones and connection limiting to prevent resource exhaustion

**3. Advanced Traffic Management**
Implement:
- Circuit breaker patterns or passive health monitoring
- Retry policies with exponential backoff and specific retryable error codes
- WebSocket/HTTP2/HTTP3/gRPC protocol handling
- Compression settings (gzip/brotli) with appropriate MIME types
- Path-based or hostname-based routing rules

**4. Security Hardening**
Include configurations for:
- DDoS mitigation parameters (connection limits, rate limiting per IP)
- Security headers (HSTS, X-Frame-Options, CSP)
- IP whitelisting/blacklisting or GeoIP restrictions (if specified)
- Mutual TLS (mTLS) configuration for backend authentication

**5. Observability Integration**
Add:
- Structured logging format (JSON) with correlation IDs
- Metrics export endpoints (Prometheus, StatsD, or cloud-native monitoring)
- Dedicated health check endpoints for load balancer self-monitoring
- Distributed tracing headers (traceparent, b3) propagation

**6. Validation & Deployment Guide**
Provide:
- Configuration syntax validation commands
- Load testing strategy (tools like wrk, vegeta, or Locust)
- Graceful reload procedures to prevent dropped connections
- Rollback strategy and backup configuration

**7. Scaling Roadmap**
Briefly explain:
- Horizontal scaling limitations of this specific technology
- When to migrate to a different solution (e.g., from Layer 4 to Layer 7)
- Capacity planning metrics to monitor

Ensure all configurations include inline comments explaining non-obvious directives. If any requirements are ambiguous, ask clarifying questions before generating the configuration.
Best Use Cases
Migrating a monolithic application to microservices and needing traffic routing between new and legacy endpoints
Configuring SSL/TLS termination at the edge to offload encryption work from application servers
Setting up blue-green or canary deployment strategies with traffic splitting capabilities
Implementing WebSocket support for real-time applications behind a load balancer without connection drops
Designing multi-region failover with geographic load balancing and health-based DNS failover
Frequently Asked Questions

More Like This

Back to Library

AI Database Migration Planner

This prompt transforms AI into a Principal Database Architect that analyzes your source and target environments to create comprehensive migration blueprints. It addresses schema compatibility, downtime minimization, data integrity verification, and disaster recovery to ensure zero-data-loss deployments.

#database#migration+3
1,418
3.7

AI Cache Strategy Designer

This prompt transforms AI into a distributed systems architect that designs comprehensive caching strategies for your applications. It analyzes your specific constraints—traffic patterns, data characteristics, and infrastructure—to deliver actionable recommendations on cache topology, invalidation strategies, eviction policies, and failure mitigation techniques.

#caching#distributed-systems+3
2,586
4.4

Enterprise API Gateway Architecture Configurator

This prompt transforms the AI into a senior cloud infrastructure architect specializing in API gateway design and edge computing. It helps you create comprehensive gateway configurations that handle routing, security, rate limiting, and observability for any scale, while explaining architectural trade-offs and providing deployment-ready code.

#api-gateway#infrastructure+3
1,461
4.1
Get This Prompt
Free
Quick Actions
Estimated time:11 min
Verified by49 experts