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

I have 20 servers in 1 location and I would like to do load balancing. This can go up to 100 in any case. Is there any known method for doing this? I would like also to have some kind of mechanism that when customer queries e.g. service.example.com, he will keep using the same server until the machine is taken out of the cluster because of fail. The client makes a DNS query every minute and let's assume top down DNS record TTL is 30-60 seconds, while others can be well 24h or so, so each session can be valid for up to 24h after initial query, and then the customer will be switched to another server.

I find L4-L7 load balancers quite useless, as I think I could use just the DNS.

The protocols are the binary only based TCP connections as well HTTP ones.

I was thinking that for binary connection (like with no protocol whatsoever), I could use round-robin on the DNS, so each time I query the DNS, I got different response.

For HTTP this is something I dont know. I could put maybe HAProxy and that's it, but for the DNS I am not sure.

I was thinking once about the following method. Send customer to some "master.example.com", which is HTTP server making only redirects, which will generate FQDN with uniqueid, which means that it's like a session id. This way, this FQDN will always resolve to same ip number and can be used only for the ip which queried for it, for the next 24h or forever until the server is switched off.

So this looks like the following:

http://redirect.example.com/resource => http://67hkkdbvh.example.com/resource

Now the session looks like this:

1st minute: http://67hkkdbvh.example.com/resource/1 TTL 60s
2nd minute: http://67hkkdbvh.example.com/resource/2 TTL 60s

If the 67hkkdbvh will die, the customer requests redirect again.

Now I am not sure how I could use HAProxy to help with it???

share|improve this question

3 Answers 3

up vote 3 down vote accepted

Certainly you could use DNS but I prefer to use proper load-balancers (I use Zeus Traffic Managers - now called Riverbed Stingrays - and Cisco ACEs), not only do they scale great but you can set them up to probe actual server responses rather than just pings or nothing, so you can take them out of service without making changes. Not free though.

share|improve this answer
    
I have the monitoring already with results in SQL table and the API for it, and the probing is quite complex. –  Andrew Smith Jul 13 '12 at 16:18
    
This is OK, I just added the load balancer in front and it was good enough, such many servers I converted to load balancers, hence just reassigned few roles and it works OK –  Andrew Smith Sep 21 '12 at 0:43

Sounds like you want to replicate the exact way that a load balancer works, so the real question is: what does a load balancer do/not do that you want/don't want?

share|improve this answer
    
Taking too much money, maintenance and space and complicate things. First, I would need to make changes in logging, reporting and security on the origin servers. Second I would require more power in Telehouse and another set of 10GBps switches. –  Andrew Smith Jul 13 '12 at 16:10
    
Rackspace offer a cloud load balancer for £8/$10 a month, that will accept external ip addresses into the pool. Web interface, very simple to use? –  AliGibbs Jul 13 '12 at 16:11
    
I have my own rack in Telehouse and my own global connectivity, plus I got 20 10GBps servers. I could not afford Rackspace because I transfer something like 100TB per day. Also I have my own edge software to do load balancing from origin servers as well cashing, so I dont see the reason of using L7 load balancer. –  Andrew Smith Jul 13 '12 at 16:13
    
Apologies @AndrewSmith I didn't realise your traffic requirements were so high –  AliGibbs Jul 13 '12 at 16:17
    
The bandwidth comes from video streaming, but not only. Basically I am looking to solve the above problem by using the DNS and eventually something very lightweight for HTTP like some redirection or something, I am a bit confused with it at the moment. –  Andrew Smith Jul 13 '12 at 16:21

did you try to take a look at haproxy? it seems that stackexchange is using it. this in HA cluster can be much more elegant solution that will provide you with failover capability.

share|improve this answer
    
I have my own edge server software, which takes the content from another set of origin servers, and it does load balancing too. What I am looking for is to balance the edge servers. I was wondering if it really makes sense to put load balancers in front of edge servers? –  Andrew Smith Jul 13 '12 at 16:17
    
why not? i think still your edge servers might be less efficient than ha-proxy... or lvs. ok if we're talking more than 10Gbit/s traffic - then go for something in the layer 3 doing lb in silicon. –  pQd Jul 13 '12 at 17:11
    
if your traffic is evenly distributed across ip subnets [i doubt] you could do some source-based routing tricks. –  pQd Jul 13 '12 at 17:14
    
Silicon is very expensive. Same for BGP router. But you gave me now idea that I could use actually ARP on switch only but I would need to rewrite the packet too, which I can potentially do. It's not for load balancing but fast failover. –  Andrew Smith Jul 13 '12 at 19:33

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.