Ez a dokumentum egy előző változata!
https://github.com/knehez/isi - folder example2
HAProxy is an open-source software that provides High Availability services, load balancing, and proxying for TCP and HTTP-based applications. It is used to distribute incoming network traffic across multiple servers to improve performance, scalability, and reliability of applications. HAProxy acts as a reverse proxy, meaning that it receives requests from clients and forwards them to the appropriate server based on various criteria such as load balancing algorithms, server health checks, and session persistence.
docker-compose.yml
version: "3.3" services: web: build: . ports: - "5000" redis: image: "redis:alpine" haproxy: image: "haproxytech/haproxy-alpine:2.4" volumes: - ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro depends_on: - web ports: - "80:80"
This is a sample HAProxy configuration that defines various global settings, default settings, and frontend/backend configurations. Here's an explanation of each section:
The frontend stats section defines a frontend for the HAProxy stats interface. It binds to port 8404 and enables the stats interface. It sets the stats URI to / and refreshes the stats page every 10 seconds.
In summary, this configuration sets up HAProxy to listen on port 80 for incoming HTTP traffic and distribute it across five backend servers that are checked for health before traffic is forwarded. It also sets up a stats interface on port 8404 to monitor the HAProxy instance.