C
C
Cyrax2012-04-05 07:51:01
CDN
Cyrax, 2012-04-05 07:51:01

Geographically distributed web server?

Good afternoon.
There is a task to make sure that for residents of the western part of our vast site, the site is given from the western server, for residents of the eastern part - from the east. Tell me how to solve the problem of traffic distribution, while taking into account the possibility of one of the servers failing.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
aeont, 2012-04-05
@aeont

I will share my experience.
Background: Windows Azure in Asia, Europe and the US hosts the Composite C1 CMS start page - c1console.composite.net/C1/StartPage.aspx
Failover and traffic distribution needed to be provided.
At first they wanted to use www.geoscaling.com - they registered a smart subdomain, they wrote a script in php:
www.geoscaling.com/dns2/wiki/short_programming_guide_for_smart_subdomains (Return the closest server to the user) ...
a piece of test config:
$new_server['lat'] = 32.802955;
$new_server['lon'] = -96.769923;
$new_server['loc'] = "DOTNETPARK, UNITED STATES, TEXAS DALLAS";
$new_server['ip'] = "1.1.1.1"; // IP1
$servers[] = $new_server;
$new_server['lat'] = 50.45;
$new_server['lon'] = 30.523333;
$new_server['loc'] = "VOLIA ISP, Ukraine, Kyiv";
$new_server['ip'] = "1.1.1.1"; // IP2
$servers[] = $new_server;
$new_server['lat'] = 55.641486;
$new_server['lon'] = 12.080418;
$new_server['loc'] = "composite.net, Denmark, ROSKILDE";
$new_server['ip'] = "1.1.1.1"; // IP3
$servers[] = $new_server;
in the settings, the failover server is set, which will serve in case of failure.
Nuances:
1) wait about 5 minutes for the config to “pick up”
2) In the smarthost settings, you need to check “Share city info (country, city, latitude ...
3) each smart request with geodata costs a total of 3 credits. You are given a certain amount for free.
4) Information from a year ago - they gave 100k credits for free, those for 33k requests.
PS As a result, we used the native tools of Windows Azure.

C
Chii, 2012-04-05
@Chii

Install a smart DNS server that will monitor both servers and, if one fails, transfer everyone to the remaining one.
And if no one fell, then on a territorial basis, throw it where necessary.
That's what I would do.

U
uran238, 2012-04-06
@uran238

nginx+geoip

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question