Can HAProxy use the port that is part of the domain?

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am setting up a cluster of servers which all run a dynamic number of services on some random ports. Each service binds to the same port on all servers.



I would like to put HAProxy in front of these servers to load balance the incoming traffic, and give clients a predictable entrypoint into the service, given they know the port of the service.



Here's a rough example of how I would like to map a given domain to my three servers. The wildcard *.example.com is pointing to the HAProxy.



32001.example.com:
- 10.0.0.1:32001
- 10.0.0.2:32001
- 10.0.0.3:32001

32002.example.com:
- 10.0.0.1:32002
- 10.0.0.2:32002
- 10.0.0.3:32002

...

35999.example.com:
- 10.0.0.1:35999
- 10.0.0.2:35999
- 10.0.0.3:35999

36000.example.com:
- 10.0.0.1:36000
- 10.0.0.2:36000
- 10.0.0.3:36000

...


Is this possible without creating a humongous config file?







share|improve this question




















  • I don;t think so, because haproxy needs to be able to check the health of the backend servers independent of what requests come in. So it needs to know the IP/port of all backend servers beforehand. Perhaps haproxy is not the right tool here.
    – wurtel
    Feb 8 at 10:20














up vote
0
down vote

favorite












I am setting up a cluster of servers which all run a dynamic number of services on some random ports. Each service binds to the same port on all servers.



I would like to put HAProxy in front of these servers to load balance the incoming traffic, and give clients a predictable entrypoint into the service, given they know the port of the service.



Here's a rough example of how I would like to map a given domain to my three servers. The wildcard *.example.com is pointing to the HAProxy.



32001.example.com:
- 10.0.0.1:32001
- 10.0.0.2:32001
- 10.0.0.3:32001

32002.example.com:
- 10.0.0.1:32002
- 10.0.0.2:32002
- 10.0.0.3:32002

...

35999.example.com:
- 10.0.0.1:35999
- 10.0.0.2:35999
- 10.0.0.3:35999

36000.example.com:
- 10.0.0.1:36000
- 10.0.0.2:36000
- 10.0.0.3:36000

...


Is this possible without creating a humongous config file?







share|improve this question




















  • I don;t think so, because haproxy needs to be able to check the health of the backend servers independent of what requests come in. So it needs to know the IP/port of all backend servers beforehand. Perhaps haproxy is not the right tool here.
    – wurtel
    Feb 8 at 10:20












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am setting up a cluster of servers which all run a dynamic number of services on some random ports. Each service binds to the same port on all servers.



I would like to put HAProxy in front of these servers to load balance the incoming traffic, and give clients a predictable entrypoint into the service, given they know the port of the service.



Here's a rough example of how I would like to map a given domain to my three servers. The wildcard *.example.com is pointing to the HAProxy.



32001.example.com:
- 10.0.0.1:32001
- 10.0.0.2:32001
- 10.0.0.3:32001

32002.example.com:
- 10.0.0.1:32002
- 10.0.0.2:32002
- 10.0.0.3:32002

...

35999.example.com:
- 10.0.0.1:35999
- 10.0.0.2:35999
- 10.0.0.3:35999

36000.example.com:
- 10.0.0.1:36000
- 10.0.0.2:36000
- 10.0.0.3:36000

...


Is this possible without creating a humongous config file?







share|improve this question












I am setting up a cluster of servers which all run a dynamic number of services on some random ports. Each service binds to the same port on all servers.



I would like to put HAProxy in front of these servers to load balance the incoming traffic, and give clients a predictable entrypoint into the service, given they know the port of the service.



Here's a rough example of how I would like to map a given domain to my three servers. The wildcard *.example.com is pointing to the HAProxy.



32001.example.com:
- 10.0.0.1:32001
- 10.0.0.2:32001
- 10.0.0.3:32001

32002.example.com:
- 10.0.0.1:32002
- 10.0.0.2:32002
- 10.0.0.3:32002

...

35999.example.com:
- 10.0.0.1:35999
- 10.0.0.2:35999
- 10.0.0.3:35999

36000.example.com:
- 10.0.0.1:36000
- 10.0.0.2:36000
- 10.0.0.3:36000

...


Is this possible without creating a humongous config file?









share|improve this question











share|improve this question




share|improve this question










asked Feb 8 at 9:33









Christoffer Reijer

1436




1436











  • I don;t think so, because haproxy needs to be able to check the health of the backend servers independent of what requests come in. So it needs to know the IP/port of all backend servers beforehand. Perhaps haproxy is not the right tool here.
    – wurtel
    Feb 8 at 10:20
















  • I don;t think so, because haproxy needs to be able to check the health of the backend servers independent of what requests come in. So it needs to know the IP/port of all backend servers beforehand. Perhaps haproxy is not the right tool here.
    – wurtel
    Feb 8 at 10:20















I don;t think so, because haproxy needs to be able to check the health of the backend servers independent of what requests come in. So it needs to know the IP/port of all backend servers beforehand. Perhaps haproxy is not the right tool here.
– wurtel
Feb 8 at 10:20




I don;t think so, because haproxy needs to be able to check the health of the backend servers independent of what requests come in. So it needs to know the IP/port of all backend servers beforehand. Perhaps haproxy is not the right tool here.
– wurtel
Feb 8 at 10:20















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f422755%2fcan-haproxy-use-the-port-that-is-part-of-the-domain%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f422755%2fcan-haproxy-use-the-port-that-is-part-of-the-domain%23new-answer', 'question_page');

);

Post as a guest













































































5lPV,60NglS33epFZxawz5J2Cv198jX,ofT3aEH15,I6mum gg9
Py3,to,A PF,f,jhumwt7,rdPGW36xwzN

Popular posts from this blog

How to check contact read email or not when send email to Individual?

How many registers does an x86_64 CPU actually have?

Displaying single band from multi-band raster using QGIS