Skip to content

jeremylongshore/tons-of-skills-marketplace / plugins/devops/load-balancer-configurator/skills/configuring-load-balancers

configuring-load-balancers

Verified

Configure use when configuring load balancers including ALB, NLB, Nginx, and HAProxy. Trigger with phrases like "configure load balancer", "create ALB", "setup nginx load balancing", or "haproxy configuration". Generates production-ready configurations with health checks, SSL termination, sticky sessions, and traffic distribution rules.

FileKindSize
SKILL.mdskill md4.6 KB
assets/README.mdmarkdown232 B
assets/haproxy_template.confconfig3.0 KB
assets/nginx_template.confconfig3.8 KB
references/README.mdmarkdown69 B
references/errors.mdmarkdown913 B
references/examples.mdmarkdown330 B
scripts/README.mdmarkdown381 B
scripts/generate_config.pyexecutablescript3.6 KB

assets/nginx_template.conf

View on GitHub
# Nginx Load Balancer Configuration Template
#
# This configuration is designed for use with the Load Balancer Configurator plugin.
# It provides a basic setup for load balancing across multiple upstream servers.
#
# To use this template:
# 1. Replace the placeholders with your actual server details.
# 2. Choose the appropriate load balancing method.
# 3. Test the configuration thoroughly before deploying to production.

# User under which nginx runs
user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    # Upstream servers - Replace these with your actual server details
    upstream backend {
        # Load balancing method:
        # - round-robin (default)
        # - least_conn
        # - ip_hash
        # - url_hash (requires nginx plus)
        # Example: least_conn;

        server <SERVER_IP_1>:<SERVER_PORT_1> weight=5; # Replace with your server IP and port
        server <SERVER_IP_2>:<SERVER_PORT_2> weight=5; # Replace with your server IP and port
        server <SERVER_IP_3>:<SERVER_PORT_3> weight=3 backup; # Replace with your server IP and port, backup server
    }

    server {
        listen       80; # Listen on port 80
        server_name  <DOMAIN_NAME>; # Replace with your domain name or IP address

        # Enforce HTTPS redirection
        # return 301 https://$host$request_uri;
        # Optional: Configure HTTPS in a separate server block

        location / {
            proxy_pass http://backend; # Proxy requests to the upstream servers
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;

            # Optional: Adjust timeouts for slow clients
            proxy_connect_timeout       60s;
            proxy_send_timeout          60s;
            proxy_read_timeout          60s;
        }

        # Optional: Add error page configuration
        # error_page   500 502 503 504  /50x.html;
        # location = /50x.html {
        #     root   /usr/share/nginx/html;
        # }
    }

    # Optional: HTTPS Configuration (Requires SSL Certificates)
    # server {
    #     listen       443 ssl http2;
    #     server_name  <DOMAIN_NAME>; # Replace with your domain name

    #     ssl_certificate     /etc/nginx/ssl/<DOMAIN_NAME>.crt; # Replace with your certificate path
    #     ssl_certificate_key /etc/nginx/ssl/<DOMAIN_NAME>.key; # Replace with your key path

    #     ssl_session_cache  shared:SSL:10m;
    #     ssl_session_timeout  10m;

    #     ssl_protocols TLSv1.2 TLSv1.3;
    #     ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384';
    #     ssl_prefer_server_ciphers   on;

    #     location / {
    #         proxy_pass http://backend;
    #         proxy_set_header Host $host;
    #         proxy_set_header X-Real-IP $remote_addr;
    #         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    #         proxy_set_header X-Forwarded-Proto $scheme;
    #     }
    # }

    # Load configuration files from the /etc/nginx/conf.d directory
    include /etc/nginx/conf.d/*.conf;
}
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 196kUpdated Claude CodeCodexVerifiedInstall