Last active
July 5, 2024 13:28
-
-
Save tebeka/c96887c2ddcebb752a81 to your computer and use it in GitHub Desktop.
HAProxy in front of Elasticsearch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elastic: | |
image: elasticsearch | |
haproxy: | |
image: haproxy | |
volumes: | |
- ${PWD}:/usr/local/etc/haproxy | |
links: | |
- elastic | |
ports: | |
- "9200:9200" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on http://j.mp/1YHQFgZ | |
# vim: ft=haproxy | |
defaults | |
timeout connect 5000 | |
timeout client 10000 | |
timeout server 10000 | |
frontend elastic | |
bind :9200 | |
mode http | |
acl is_delete method DELETE | |
http-request deny if is_delete | |
default_backend elastic | |
backend elastic | |
mode http | |
option forwardfor | |
balance source | |
option httpclose | |
server es1 elastic:9200 weight 1 check inter 1000 rise 5 fall 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment