HSB
HSB

Reputation: 31

How to specify Port Range in 'haproxy' frontend?

I have haproxy working, but one port per line is specified.

frontend localhost
    bind *:8443
    bind *:443
    bind *:80
    bind *:8080

Say, if I want to specify port range, like 30000-35000, how do I do that? I don't want to add 5K lines.

Upvotes: 0

Views: 2247

Answers (1)

HSB
HSB

Reputation: 31

NM ... I got answer

bind [<address>]:<port_range> [, ...]
bind *:2000-2100

Particular care must be taken against port ranges, because every couple consumes one socket (= a file descriptor), so it's easy to consume lots of descriptors with a simple range, and to run out of sockets

Upvotes: 2

Related Questions