listen http-inbind x.x.x.x:80option httplogbalance sourceuse-server old if { req.cook(SITEID) -m beg old_site_90 }use-server new if { req.cook(SITEID) -m beg new_site_10 }server old 127.0.0.1:8080 weight 90server new 127.0.0.1:8081 weight 10default_backend old listen old bind 127.0.0.1:8080 mode http option httplog balance roundrobin cookie SITEID insert indirect nocache maxlife 48h server web01 x.x.x.x:80 check inter 1000 maxconn 125 cookie old_site_90 appsession SESS len 50 timeout 3h request-learn prefix option http-server-close option httpclose option forwardfor listen new bind 127.0.0.1:8081 mode http option httplog balance roundrobin cookie SITEID insert indirect nocache maxlife 48h server web02 x.x.x.x:80 check inter 1000 maxconn 125 cookie new_site_10 appsession SESS len 50 timeout 3h request-learn prefix option http-server-close option httpclose option forwardfor Now this is all fine for cookies which are already set but the initial seeding needs to be done to take care of the 90:10 split. This can be done by having multiple servers on "old" backend and one of them sending out the "SITEID" as "new_site_10". This will seed a small proportion of users onto the new backend. Setup Details Centos 6.6 haproxy-1.5.5-1.el6.x86_64]]>Check the pricing of our offerings here
A/B Testing with haproxy
Tarun Dua
May 19, 2022
1 min read
Related Articles
Cloud Computing
VM vs Containerised VM: A Comprehensive Comparison
Compare Virtual Machines (VMs) and containerised VMs, highlighting their differences, advantages, and disadvantages. Discover how E2E Cloud leverages both technologies for robust,...
E2E Networks
Aug 7, 2024
3 min read
Cloud Computing
Virtual Machines vs Containers
Understand the key differences between virtual machines and containers. Learn how each technology works, their pros and cons, and which is better suited for your cloud deployment n...
E2E Networks
Aug 6, 2024
6 min read
Cloud Computing
E2E Networks: Your MeitY Empanelled Cloud Service Provider
E2E Networks proudly announces its empanelment as a Cloud Service Provider (CSP) by India's Ministry of Electronics and Information Technology (MeitY).
E2E Editorial
Jul 1, 2024
3 min read