ha-load-balancing

Configure HAProxy and NGINX load balancing for containerized microservices with health checks and failover.

4|1|Updated Dec 9, 2025
One-click install
npx skills add https://github.com/stakpak/community-paks --skill ha-load-balancing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ha-load-balancing
Source: https://github.com/stakpak/community-paks/tree/main/ha-load-balancing
Command: npx skills add https://github.com/stakpak/community-paks --skill ha-load-balancing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Configure high-availability load balancing with HAProxy and NGINX reverse proxies. Covers health checks, automatic failover, sticky sessions, and stats monitoring for containerized backends.

Core Features & Use Cases

  • Health checks and automatic failover to keep traffic away from unhealthy backends
  • Sticky sessions and session persistence across backends
  • Real-time stats monitoring and observability of the proxy layer in containerized deployments

Quick Start

Deploy the stack with docker compose up -d and verify that all backends report healthy and traffic is evenly distributed.

Frequently Asked Questions about ha-load-balancing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure load balancing for containerized microservices with Docker Compose?

You can configure load balancing for containerized microservices by deploying HAProxy and NGINX as reverse proxies within your Docker Compose environment, enabling scalable traffic distribution across dynamic backends. This setup supports automatic failover and real-time stats monitoring.

How do health checks and automatic failover work for high-availability backends?

Health checks continuously monitor backend availability, automatically rerouting traffic away from unhealthy containers to healthy ones during failover. This ensures high availability and prevents requests from reaching unresponsive microservices.

Can I enable sticky sessions for HTTP load balancing across multiple backends?

Yes, you can enable sticky sessions for HTTP load balancing to maintain session persistence across multiple backends. This ensures user requests are consistently routed to the same backend container during their session.

Does this load balancing configuration support real-time stats monitoring?

Yes, the load balancing configuration supports real-time stats monitoring and observability at the proxy layer. You can verify backend health, traffic distribution, and performance metrics for your containerized deployment.

What is the best way to achieve high-availability load balancing with HAProxy and NGINX?

Combining HAProxy and NGINX as reverse proxies provides resilient high-availability load balancing for multi-backend deployments. This approach handles health-based failover, sticky sessions, and dynamic backend scaling within Docker Compose environments.

How do I verify that traffic is evenly distributed after deploying the proxy stack?

After running docker compose up -d, you can verify traffic distribution by checking the real-time stats monitoring dashboard and confirming all containerized backends report a healthy status.