Skip to content

Instantly share code, notes, and snippets.

@cernceph
Created June 10, 2016 11:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cernceph/4a03316a31ce7abe49167c392fc827da to your computer and use it in GitHub Desktop.
Save cernceph/4a03316a31ce7abe49167c392fc827da to your computer and use it in GitHub Desktop.
haproxy multi backend radosgw config
frontend cs3.cern.ch-frontend-ssl
bind ipv4@:443,ipv6@:443 ssl no-sslv3 crt /etc/haproxy/cert.pem verify none
acl ha_stats url_beg /stats
acl pathstyle_buckets hdr(host) -i cs3.cern.ch
capture request header User-Agent len 256
capture request header Host len 128
http-request set-var(req.bucketname) path,word(1,/) if pathstyle_buckets
http-request set-var(req.bucketname) hdr(host),regsub(.cs3.cern.ch,) if ! pathstyle_buckets
http-request set-header X-Debug-Bucket %[var(req.bucketname)]
timeout http-request 5m
timeout client 5m
use_backend stats if ha_stats
use_backend %[var(req.bucketname),lower,map(/etc/haproxy/buckets.map,backend-beesly)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment