Skip to content

Instantly share code, notes, and snippets.

haproxytechblog

Block or report user

Report or block haproxytechblog

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@haproxytechblog
haproxytechblog / blog20191008-01.sh
Last active Oct 8, 2019
HAProxy and Docker Swarm
View blog20191008-01.sh
$ apt update
$ apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
$ apt update
$ apt install docker-ce docker-ce-cli containerd.io
View blog20190830-01.cfg
frontend www
bind :80
# Add a response header
http-response add-header X-XSS-Protection "1; mode=block"
# Remove a response header
http-response del-header X-Powered-By
# Change a response header
@haproxytechblog
haproxytechblog / blog20190724-01.txt
Last active Aug 27, 2019
DNS for Service Discovery in HAProxy
View blog20190724-01.txt
_service._proto.name. TTL class SRV priority weight port target
@haproxytechblog
haproxytechblog / blog20190730-01.cfg
Created Jul 29, 2019
Four Examples of HAProxy Rate Limiting
View blog20190730-01.cfg
backend servers
server s1 192.168.30.10:80 check maxconn 30
server s2 192.168.31.10:80 check maxconn 30
server s3 192.168.31.10:80 check maxconn 30
@haproxytechblog
haproxytechblog / blog20190723-01.sh
Last active Sep 4, 2019
HAProxy Traffic Mirroring for Real-world Testing
View blog20190723-01.sh
$ sudo apt update
$ sudo apt install -y autoconf automake build-essential git libcurl4-openssl-dev libev-dev libpthread-stubs0-dev pkg-config
$ git clone https://github.com/haproxytech/spoa-mirror
$ cd spoa-mirror
$ ./scripts/bootstrap
$ ./configure
$ make all
$ sudo cp ./src/spoa-mirror /usr/local/bin/
@haproxytechblog
haproxytechblog / blog20171011-01.cfg
Last active Oct 11, 2019
HAProxy SSL Termination
View blog20171011-01.cfg
frontend www.mysite.com
bind 10.0.0.3:80
bind 10.0.0.3:443 ssl crt /etc/ssl/certs/mysite.pem
default_backend web_servers
@haproxytechblog
haproxytechblog / blog20190712-01.cfg
Last active Jul 12, 2019
HAProxy Layer 7 Retries and Chaos Engineering
View blog20190712-01.cfg
backend be_servers
balance roundrobin
server s1 server1:80 maxconn 10
server s2 server2:80 maxconn 10
server s3 server3:80 maxconn 10
@haproxytechblog
haproxytechblog / blog20190705-01.sh
Last active Sep 17, 2019
Dissecting the HAProxy Kubernetes Ingress Controller
View blog20190705-01.sh
kubectl apply -f https://raw.githubusercontent.com/haproxytech/kubernetes-ingress/master/deploy/haproxy-ingress.yaml
View blog20190628-01.sh
$ curl --get --user admin:mypassword \
http://localhost:5555/v1/services/haproxy/configuration/backends
View blog20190616-01.cfg
log stdout local0
log fd@1 local0
log stdout format raw local0
You can’t perform that action at this time.