# Traffic control per subdomain

**URL:** <https://discourse.haproxy.org/t/traffic-control-per-subdomain/6553>\
**Category:** Help!\
**Created:** [May 7, 2021, 12:51pm UTC](https://discourse.haproxy.org/t/traffic-control-per-subdomain/6553 "2021-05-07T12:51:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedropoz](https://avatars.discourse-cdn.com/v4/letter/p/e56c9b/32.png) [@pedropoz](https://discourse.haproxy.org/u/pedropoz)\
**Post date:** [May 7, 2021, 12:51pm UTC](https://discourse.haproxy.org/t/traffic-control-per-subdomain/6553/1 "2021-05-07T12:51:24Z")

</div>

Hi guys  
Currently, I have the following setup:

> defaults  
> log global  
> mode http  
> retries 3  
> balance roundrobin  
> option abortonclose  
> option redispatch  
> contimeout 10000  
> clitimeout 150000  
> srvtimeout 300000  
> maxconn 500000

But I want to limit the number of simultaneous accesses per subdomain.  
For example, say the limit is 500 active connections per subdomain:

[a.mysite.com](http://a.mysite.com) → 500 active connections  
[b.mysite.com](http://b.mysite.com) → 500 active connections  
[c.mysite.com](http://c.mysite.com) → 499 active connections

If someone tries to access either “a” or “b”, they won’t be allowed.  
But it’s OK if someone tries to access “c”.

Thanks in advance.
