harbor run -t LiteCoder/haproxy-load-balancer-setup__sample_0020_914465e1harbor download LiteCoder/haproxy-load-balancer-setup__sample_0020_914465e1Set up HAProxy to distribute HTTP traffic across multiple backend web servers with health checks and monitoring capabilities.
Technical Requirements:
/app/haproxy.cfg/app/verification.jsonImplementation Requirements:
Backend Servers Setup:
HAProxy Configuration (/app/haproxy.cfg):
/haproxy?statsVerification Output (/app/verification.json):
Provide a JSON file documenting the configuration and test results:
{
"haproxy_frontend_port": 80,
"backend_servers": [
{"name": "server1", "host": "127.0.0.1", "port": 8081, "status": "up"},
{"name": "server2", "host": "127.0.0.1", "port": 8082, "status": "up"},
{"name": "server3", "host": "127.0.0.1", "port": 8083, "status": "up"}
],
"load_balancing_algorithm": "roundrobin",
"health_check_enabled": true,
"stats_page_enabled": true,
"stats_page_path": "/haproxy?stats",
"load_distribution_test": {
"total_requests": 9,
"server1_hits": 3,
"server2_hits": 3,
"server3_hits": 3
}
}
Expected Behavior:
/app/haproxy.cfg for review