mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-30 08:32:05 +00:00
89da7cf5d5
This config was taken from the example provided in the dpbench project. It uses minimalistic keywords and is trivial to setup and adapt on any test machine for a quick test. It can be convenient when comparing different server platforms to pick the one delivering the best performance in various dimensions (conn rate, req rate, ssl rate, bit rate). It uses a single listener (optionally a second one with SSL), a single server, power-of-two-choices (random(2)) algorithm, and no privileged directive.
30 lines
845 B
INI
30 lines
845 B
INI
# Basic config mapping a listening IP:port to another host's IP:port with
|
|
# support for HTTP/1 and 2.
|
|
|
|
global
|
|
strict-limits # refuse to start if insufficient FDs/memory
|
|
# add some process-wide tuning here if required
|
|
|
|
# A stats socket may be added to check live metrics if the load generators
|
|
# do not report them.
|
|
# stats socket /tmp/haproxy.sock level admin
|
|
# stats timeout 1h
|
|
|
|
defaults
|
|
mode http
|
|
balance random # power-of-two-choices
|
|
timeout client 60s
|
|
timeout server 60s
|
|
timeout connect 1s
|
|
|
|
listen p
|
|
# this is the address and port we'll listen to, the ones to aim the
|
|
# load generators at
|
|
bind :8000
|
|
|
|
# create a certificate and uncomment this for SSL
|
|
# bind :8443 ssl crt my-cert.pem alpn h2,http/1.1
|
|
|
|
# Put the server's IP address and port below
|
|
server s1 172.31.32.33:8000
|