Community discussions

MikroTik App
 
mbabuskov
just joined
Topic Author
Posts: 1
Joined: Sun Oct 14, 2012 10:45 pm

Connection to different hostname using the same IP address

Sun Oct 14, 2012 10:56 pm

Hello,

I run a website with multiple domain names served from the same IP address. Some of my users report having issues and gathering all the information about them it turns out they are all using Mikrotik routers.

The website runs at mydomain.com and then at some point of time redirects user to subdomain.mydomain.com. Website uses websockets and xhr-polling and jsonp-polling, so all connections are keep-alive without Connection Close header. Since both mydomain.com and subdomain.mydomain.com are on the same IP address and same port, Mikrotik decides to reuse the http connection.

However, this poses a problem, because on my end, connections are routed through HAProxy to completely different servers based on the hostname. HAProxy only checks this at initial communication. So requests that should be sent to subdomain.mydomain.com end up at server serving mydomain.com which does something completely different, and users get the error.

Is there some way to tell Mikrotik do defer from this behavior? I do not have control over user systems, and most probably they don't either as those are ISP's Mikrotiks probably. I'm looking for some HTTP headers that I could send which would force Mikrotik to start a new connection when a different hostname in encountered?

Thanks.

Who is online

Users browsing this forum: floresta, gimmo, Google [Bot] and 120 guests