Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Forgive this question, I'm a designer trying to get my head around a possible network architecture. I have a wildcard domain on The client connects via TCP to Is it possible for the process that is handling the connection to be aware of which subdomain the client connected to?

Just to be more clear:

Client -[packet]-> -[host,packet]-> server1.internal

My thought was I could use HAProxy to route requests to the correct machine, but because it's not HTTP I'm not sure if I can get the subdomain from the incoming packets. Any help would be appreciated.

share|improve this question
up vote 3 down vote accepted

I assume you can't give the subdomains different IP addresses. In which case, unless the protocol (way above the TCP layer) supports sending hostnames like HTTP does, the answer is no.

If you can choose different IP addresses for each subdomain, then that is your answer.

share|improve this answer
I was afraid this would be the case. Thanks for confirming it for me anyway. – Chris Lloyd May 14 '11 at 4:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.