Traffic control per subdomain

Hi guys
Currently, I have the following setup:

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: → 500 active connections → 500 active connections → 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.