HAProxy community

Traffic mirroring with dynamic percentage from map

HAProxy version 2.1

Following the documentation in this blog post: https://www.haproxy.com/blog/haproxy-traffic-mirroring-for-real-world-testing/

We are looking to have a map file which contains the percentage of traffic to be mirrored so it would be always ‘on’ but configurable at runtime. Is something like this supported?

acl mirroring_on rand(100) lt str(percentage),map_str_int(/usr/local/etc/haproxy/mirror.map)