Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Forgive this question, I'm a designer trying to get my head around a possible network architecture. I have a wildcard domain on example.com. The client connects via TCP to foo.example.com:1234. 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]-> foo.example.com:1234 -[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

1 Answer 1

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

 
discard

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.