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 / blog20200211-01.yaml
Created Feb 10, 2020
Rolling Updates and Blue-Green Deployments with Kubernetes and HAProxy
View blog20200211-01.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: haproxy-configmap
namespace: default
data:
ssl-redirect: "OFF"
@haproxytechblog
haproxytechblog / video-inuits-20200123-01.cfg
Created Jan 23, 2020
HAProxyConf 2019 - HAProxy as Egress Controller
View video-inuits-20200123-01.cfg
frontend proxy
acl client:myback:prod src 172.21.132.0/25
acl client:myback:dev src 172.21.131.0/25
acl client:myback:acc src 172.21.130.0/25
acl client:legback:dev src 172.21.132.2 172.21.132.4
acl client:3rdapp:prod src 172.21.132.0/25
View blog20200122-01.cfg
frontend proxy
http-request set-path /path2 if { path /path1 } { date() ge 1571558400 }
@haproxytechblog
haproxytechblog / blog20200121-01.cfg
Created Jan 21, 2020
Building Blocks of a Modern Proxy
View blog20200121-01.cfg
stats socket /var/run/haproxy.sock mode 600 expose-fd listeners level user
View video-thredup-20200120-01.cfg
backend cart_service
server blue-cart-service cart-blue.ec2.tup.internal:8025 check weight 0 backup
server green-cart-service cart-green.ec2.tup.internal:8025 check weight 100
View video-yammer-20190120-01.cfg
defaults
mode {protocol}
balance {balanceMode}
timeout client {clTO}
timeout connect {cTO}
timeout server {sTO}
timeout http-keep-alive {kaTO}
listen ::{service}-{servicePort}
acl down nbsrv(hc-{servicePort}) lt 1
@haproxytechblog
haproxytechblog / blog20191216-01.cfg
Last active Dec 16, 2019
Programmatic HAProxy Configuration Using the Data Plane API
View blog20191216-01.cfg
userlist dataplane-api
user dataplaneapi password $5$oui1y1Q7o$VXoOr7Ns9WLyDFkWH0LTu9oysn/zyYhF4mSQHe9Ba5D
program api
command /opt/hapee-extras/sbin/hapee-dataplane-api --host 192.168.122.14 --port 5555 -c /etc/hapee-2.0/hapee-lb.cfg -u dataplane-api -b /opt/hapee-2.0/sbin/hapee-lb -r "service hapee-2.0-lb reload" --reload-delay 5 -m /var/run/hapee-2.0/hapee-lb.sock --log-to=file --log-file=/var/log/hapee-runtime-api.log
View haproxy-config-2-1.cfg
#
# This is the ultimate HAProxy 2.0 "Getting Started" config
# It demonstrates many of the features available which are now available
# While you may not need all of these things, this can serve
# as a reference for your own configurations.
#
# Have questions? Check out our community Slack:
# https://slack.haproxy.org/
#
@haproxytechblog
haproxytechblog / blog20191129-01.cfg
Last active Nov 29, 2019
HAProxy 2.1: Supercharged Performance and a Cleaner Codebase
View blog20191129-01.cfg
global
h1-case-adjust content-length Content-Length
@haproxytechblog
haproxytechblog / blog20191008-01.sh
Last active Nov 25, 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
You can’t perform that action at this time.