26

This is my case:

I have 6 servers across US and Europe. All servers are on a load balancer. When you visit the website (www.example.com) its pointing on the load balancer IP address and from their you are redirect to one of the servers. Currently, if you visit the website from Germany for example, you are transfered randomly in one of the server. You could transfer to the Germany server or the server in San Fransisco.

I am looking for a way to redirect users to the nearest server based on their location but without changing url. So I am NOT looking of having many url's such as www.example.com, www.example.co.uk, www.example.dk etc

I am looking for something like a CDN where you retrieve your files from the nearest server (?) so I can get rid of the load balancer because if it crashes, the website does not respond (?)

For example:

If you are from uk, redirect to IP 53.235.xx.xxx If you are from west us, redirect to IP .... if you are from south europe, redirect to IP ... etc

DNSMadeeasy offers a feature similar to this but they are charging a 600 dollars upfront price and for a startup that doesnt know if that feature will work as expected or there is no trial version we cannot afford: http://www.dnsmadeeasy.com/enterprise-dns/global-traffic-director/

What is another way of doing this?

Also another question on the current setup. Even with 6 servers all connected to the load balancer, if the load balancer has lag issues, it takes everything with it, right? or if by any change it goes down, the website does not respond. So what is the best way to eliminate that downtime so that if one server IP address does not respond, move to the next (as a load balancer would do but load balancers can have issues themselves)

jQuerybeast
  • 14,130
  • 38
  • 118
  • 196
  • The GeoDNS is what I am looking for. But I thought they could be a way of doing it myself? Im not sure wether that company is reliable or safe. – jQuerybeast Feb 04 '12 at 05:24
  • 2
    http://www.caraytech.com/geodns/ which I posted above, actually lets you do it for free, yourself. You need BIND (http://www.isc.org/sw/bind) and the patch, http://www.caraytech.com/geodns/bind-9.4.1-geodns-patch.tar.gz Please refer to the caraytech site for instructions. – ionFish Feb 04 '12 at 05:30
  • What I am looking for! I dont know what I have to do with it though. Never used Bind. Gonna start reading. Thank you – jQuerybeast Feb 04 '12 at 05:36
  • Do you have any idea on my second question? (last paragraph) – jQuerybeast Feb 04 '12 at 05:38
  • Your second question: A load balancer may either be DNS-based or proxy-based. Your case calls for DNS-based load balancers. Now, no matter what country you are visiting from, the client will always have to communicate with your DNS server first, which could be on the opposite side of the world. Now, you could get slow-ish ping times from Japan to Ohio. It's only a quick lookup, it shouldn't make a difference. If your DNS goes down, your entire site goes down. (Which is why we round-robin DNS servers AS WELL AS "A-records".) How to set up BIND: http://ubuntuforums.org/showthread.php?t=236093 – ionFish Feb 04 '12 at 05:46
  • Another guide, couldn't fit in last comment. http://www.ludd.luth.se/~kavli/BIND-FAQ.html – ionFish Feb 04 '12 at 05:48
  • This got me confused. I am farely new with all this. My load balancer which is with Rackspace (http://www.rackspace.com/cloud/cloud_hosting_products/loadbalancers/) is just a single IP. So I guess is not DNS-based either proxy-based. Even if its set to round robin, if that IP is down or slow, all the website response is slow so I am a little bit confused. Thank you for the links. – jQuerybeast Feb 04 '12 at 05:54
  • A Proxy load balancer requires a very fast proxy server (you may even have a few of these) which each themselves proxy the content from several other servers, such as an image server, a database server, and a content server. (Or all the same). One other suggestion is http://www.cloudflare.com/ which is basically a proxy load balancer, if you enable high caching. (Free or premium). I'm not sure how important or fast you need this set up, though. Perhaps you could email me about this if you need further assistance. "jeff --at-- plz.re" – ionFish Feb 04 '12 at 06:10
  • Thank you. I am aware of cloudflare but unfortunately it is not so reliable as many times their servers go down and it takes your website too (happened several times). Although I love the concept of cloudflare and how it works, it is not a good service for high traffic websites. – jQuerybeast Feb 04 '12 at 11:18

1 Answers1

6

Would help to know what type of application servers you're talking about; i.e. J2EE (like JBoss/Tomcat), IIS, etc?

You can use a hardware or software load balancer with Sticky IP and define ranges of IPs to stick to different application servers. Each country's ISPs should have it's own block of IPs.

There's a list at the website below.

http://www.nirsoft.net/countryip/

Here's also a really, really good article on load balancing in general, with many high availability / persistence issues addressed. That should answer your second question on the single point of failure at your load balancer; there's many different techniques to provide both high availability and load distribution. Alot depends on what kind of application your run and whether you require persistent sessions or not. Load balancing by sticky IP, if persistence isn't required and you're LB does health checks properly, can provide high availability with easy failover. The downside is that load isn't evenly distributed, but it seems you're looking for distribution based on proximity, not on load.

http://1wt.eu/articles/2006_lb/index.html

Jim
  • 6,753
  • 12
  • 44
  • 72
  • My servers are from a range of Cloud to VPS servers. All on Debian 5.0 lenny if that helps? What I've understood from your answer, the user still has to reach the load balancer which is physically in one location. That will make the user to access that location no matter when they are based which that is not what I am looking for. I would assume the fastest option is this to be made from the DNS itself? – jQuerybeast Mar 24 '12 at 13:59