Skip to content

Instantly share code, notes, and snippets.

@ingardm
Forked from obfuscurity/haproxy.cfg and carbon.conf
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ingardm/996c94cd17df02acaca6 to your computer and use it in GitHub Desktop.
Save ingardm/996c94cd17df02acaca6 to your computer and use it in GitHub Desktop.
## haproxy.cfg
global
user haproxy
group haproxy
daemon
maxconn 16384
pidfile /var/run/haproxy.pid
defaults
balance roundrobin
mode tcp
retries 3
option redispatch
contimeout 300000
clitimeout 1800000
srvtimeout 1800000
# distribute across our fanout carbon-relays
listen carbon_relay_2003 0.0.0.0:2003
mode tcp
maxconn 1024
server carbon_relay_2113 127.0.0.1:2113 check maxconn 1024
server carbon_relay_2213 127.0.0.1:2213 check maxconn 1024
server carbon_relay_2313 127.0.0.1:2313 check maxconn 1024
server carbon_relay_2413 127.0.0.1:2413 check maxconn 1024
# distribute across our fanout carbon-relays
listen carbon_relay_2004 0.0.0.0:2004
mode tcp
maxconn 1024
server carbon_relay_2114 127.0.0.1:2114 check maxconn 1024
server carbon_relay_2214 127.0.0.1:2214 check maxconn 1024
server carbon_relay_2314 127.0.0.1:2314 check maxconn 1024
server carbon_relay_2414 127.0.0.1:2414 check maxconn 1024
## carbon.conf
[cache]
USER = www
MAX_CACHE_SIZE = inf
MAX_UPDATES_PER_SECOND = 500000
MAX_CREATES_PER_MINUTE = 50000
LINE_RECEIVER_INTERFACE = 0.0.0.0
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
CACHE_QUERY_INTERFACE = 0.0.0.0
LOG_UPDATES = False
WHISPER_AUTOFLUSH = False
[cache:a]
LINE_RECEIVER_PORT = 2103
PICKLE_RECEIVER_PORT = 2104
CACHE_QUERY_PORT = 7102
[cache:b]
LINE_RECEIVER_PORT = 2203
PICKLE_RECEIVER_PORT = 2204
CACHE_QUERY_PORT = 7202
[cache:c]
LINE_RECEIVER_PORT = 2303
PICKLE_RECEIVER_PORT = 2304
CACHE_QUERY_PORT = 7302
[cache:d]
LINE_RECEIVER_PORT = 2403
PICKLE_RECEIVER_PORT = 2404
CACHE_QUERY_PORT = 7402
[cache:e]
LINE_RECEIVER_PORT = 2503
PICKLE_RECEIVER_PORT = 2504
CACHE_QUERY_PORT = 7502
[cache:f]
LINE_RECEIVER_PORT = 2603
PICKLE_RECEIVER_PORT = 2604
CACHE_QUERY_PORT = 7602
[cache:g]
LINE_RECEIVER_PORT = 2703
PICKLE_RECEIVER_PORT = 2704
CACHE_QUERY_PORT = 7702
[cache:h]
LINE_RECEIVER_PORT = 2803
PICKLE_RECEIVER_PORT = 2804
CACHE_QUERY_PORT = 7802
[relay]
LINE_RECEIVER_INTERFACE = 0.0.0.0
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
MAX_QUEUE_SIZE = 10000
MAX_DATAPOINTS_PER_MESSAGE = 50000
RELAY_METHOD = consistent-hashing
DESTINATIONS = 127.0.0.1:2104:a, 127.0.0.1:2204:b, 127.0.0.1:2304:c, 127.0.0.1:2404:d, 127.0.0.1:2504:e, 127.0.0.1:2604:f, 127.0.0.1:2704:g, 127.0.0.1:2804:h
[relay:a]
LINE_RECEIVER_PORT = 2113
PICKLE_RECEIVER_PORT = 2114
[relay:b]
LINE_RECEIVER_PORT = 2213
PICKLE_RECEIVER_PORT = 2214
[relay:c]
LINE_RECEIVER_PORT = 2313
PICKLE_RECEIVER_PORT = 2314
[relay:d]
LINE_RECEIVER_PORT = 2413
PICKLE_RECEIVER_PORT = 2414
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment