# Hdr vs hdr\_beg for lower CPU load

**URL:** <https://discourse.haproxy.org/t/hdr-vs-hdr-beg-for-lower-cpu-load/4910>\
**Category:** Help!\
**Created:** [February 28, 2020, 11:43am UTC](https://discourse.haproxy.org/t/hdr-vs-hdr-beg-for-lower-cpu-load/4910 "2020-02-28T11:43:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyppopotamus](https://avatars.discourse-cdn.com/v4/letter/h/fbc32d/32.png) [@hyppopotamus](https://discourse.haproxy.org/u/hyppopotamus)\
**Post date:** [February 28, 2020, 11:43am UTC](https://discourse.haproxy.org/t/hdr-vs-hdr-beg-for-lower-cpu-load/4910/1 "2020-02-28T11:43:12Z")

</div>

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](http://blabla1.com)  
acl blabla2 hdr\_beg(host) -i [blabla2.com](http://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.

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [February 28, 2020, 6:49pm UTC](https://discourse.haproxy.org/t/hdr-vs-hdr-beg-for-lower-cpu-load/4910/2 "2020-02-28T18:49:18Z")

</div>

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