Created
November 16, 2017 02:35
-
-
Save shyazusa/7ed1430b537f48a1b4aae6a62d948613 to your computer and use it in GitHub Desktop.
HAProxyのコンフィグファイルの一例です。
This file contains hidden or 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
# Global | |
global | |
daemon | |
# Defaults | |
defaults | |
mode tcp | |
timeout connect 5s | |
timeout client 10s | |
timeout server 10s | |
retries 2 | |
# REDIS | |
frontend redis | |
bind *:6379 | |
default_backend redis_backend | |
backend redis_backend | |
option tcp-check | |
tcp-check connect | |
tcp-check send PING\r\n | |
tcp-check expect string +PONG | |
tcp-check send info\ replication\r\n | |
tcp-check expect string role:master | |
tcp-check send QUIT\r\n | |
tcp-check expect string +OK | |
server redis1 127.0.0.1:6380 check inter 1s | |
server redis2 127.0.0.1:6381 check inter 1s | |
# Elasticsearch | |
frontend elasticsearch | |
bind *:9200 | |
default_backend elasticsearch_backend | |
backend elasticsearch_backend | |
balance first | |
option redispatch | |
retries 2 | |
server elasticsearch1 127.0.0.1:9201 check inter 1s | |
server elasticsearch2 127.0.0.1:9202 check inter 1s | |
server elasticsearch3 127.0.0.1:9203 check inter 1s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment