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

February 11, 2026

1,578
Total Copies
4.2
Average 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

Can this generate Infrastructure-as-Code (Terraform/CloudFormation) instead of raw config files?

Yes. Specify your IaC tool (Terraform, Pulumi, CloudFormation) in the LOAD_BALANCER_TYPE variable or INFRASTRUCTURE_CONTEXT, and the AI will generate the appropriate resource definitions instead of raw configuration syntax.

What if I don't know specific values like optimal timeout durations or buffer sizes?

Leave those details out or state 'use conservative defaults.' The AI will provide industry-standard starting values with explanations of when to adjust them based on observed metrics.

Does this handle Kubernetes Ingress configurations?

Absolutely. Specify 'Kubernetes Ingress-NGINX' or 'Traefik IngressRoute' as your load balancer type, and include your K8s version and service mesh details (Istio/Linkerd) in the infrastructure context.

Get this Prompt

Free
Estimated time: 5 min
Verified by 49 experts

More Like This

AI Database Migration Planner

Generate production-ready database migration strategies with risk assessment, rollback protocols, and step-by-step execution plans.

#database#migration+3
1,418
Total Uses
3.7
Average Rating
View Prompt

AI Cache Strategy Designer

Architect high-performance, scalable caching layers tailored to your specific infrastructure and consistency requirements.

#caching#distributed-systems+3
2,586
Total Uses
4.4
Average Rating
View Prompt

Enterprise API Gateway Architecture Configurator

Generate production-ready, secure, and scalable API gateway configurations with infrastructure-as-code templates and best practices.

#api-gateway#infrastructure+3
1,461
Total Uses
4.1
Average Rating
View Prompt