On 12.09.2010 22:28, Willy Tarreau wrote:
Hi Daniel,

On Tue, Sep 07, 2010 at 12:30:18PM +0200, Daniel Storjordet wrote:
  Hi!

Current implementation of HAProxy is working great for us. The other day
we had a server failure without us or our customers' noticing.

Today our HAProxy solution is hosted on the same location as our content
servers. Unfortunately we have experienced problems with our hosting
companies. Changing the IP for all the domain names for the web pages
hosted on our servers every time we need to switch to a new host is too
much work.

To solve this we wish to relocate the HAProxy servers to a different
location than the content servers. The new host is placed at the
backbone of our countrys internet and the ips can be moved to another
host if needed. With this change we will be able to host our content
servers and backup servers at any location and can move them around
without updating all the domain names every time.

However we are concerned about the performance penalty of hosting the
HAProxy servers at an different location that the content servers. Are
there any statistics on what kind of performance penalty we will
receive, and any other unforeseen effects this might have?
You must consider that you'll add a round-trip between your haproxy and
your servers. If they are too far away, the users will notice the added
time. Also, your internet access point will see the traffic in the two
directions. This means that you will see in each direction the sum of
what you currently have in both directions.
Yes. Fortunately I live in a small country and the datacenter we are evaluating as the haproxy host is the largest and most central datacenter in our nation's capital. I live on the other edge of the country but i still get lower than 10ms ping times to the servers at this datacenter so traffic both ways should only be about 20ms slower. Normally people would have a 10ms ping to the server anyway so it is just 10ms more.

The 2x traffic has also been taken into account.

As long as the added round-trip and 2x traffic is the only effects then I think we have a go ahead for this project.

I don't know if this can apply to your case, but haproxy supports a
redirect-based type of servers. The principle is that if you specify
"redir XXXX" on a "server" line, then for each GET or HEAD request,
instead of connecting to the server, it will return a 302 with XXX
as the prefix, so that the browser retries on the other server. Methods
that are not GET or HEAD are still forwarded as usual. This is well
suited for downloading large objects : the added RTT between the client
and the server is then negligeable, and the client does not have any
reason to stay on that server.

It should be avoided for session logins for instance, because once the
client targets the real server, it will not be redispatched if the
server fails.

The servers are hosting about 300 different sites and we only has dns access to about 100 of them so doing this on a large scale would probably be too much work.

Is it possible to add the prefix behind instead of as a prefix? This would be extremely usefull if you wish this feature with a cdn. Then we could make a CDN server that answers to *.mycdn.com" and redirect requests like "www.mysite.com/mylargepicture.png" to "www.mysite.com.mycdn.com/mylargepicture.png" without having to manualy create subdomains for every domain.

Thank you for your reply.

--
mvh.

Daniel Storjordet

D E S T ! N O :: Strandgata 117 :: 4307 Sandnes
Mob 45 51 73 71 :: Tel 51 62 50 14  dan...@desti.no :: http://www.desti.no
www.destinet.no - Webpublisering på nett
www.func.no - Flysøk på nett




Regards,
Willy





Reply via email to