HAProxy community

Hdr vs hdr_beg for lower CPU load

Hi community. I have a hard config with more than 1000 backends and the same amount of acl rules to redirect http(s) requests to these backends.

This config looks like

acl blabla1 hdr_beg(host) -i blabla1.com
acl blabla2 hdr_beg(host) -i blabla2.com

use_backend back_blabla1 if blabla1
use_backend back_blabla2 if blabla2

So, the question is: what is better to use for lower CPU load – hdr_beg or hdr? (if no differences in result)

I could not find any information what derivative is “harder” for CPU.

I’d assume hdr() burns less cycles, however I doubt this will have a big impact.