need help is DNS routing. and connecting two servers under one domain

Status
Not open for further replies.

cyberchennai

Active Member
78
2011
1
0
say i have two servers one in europe another in asia.
i want those two server to be under single domain. and visitors from europe should be directed to european server and asia to asian server.

and i m planning to have european server as main DB server for forum and blog. how do i connect the asian server to db on european server... ????

=)=)=)=)

pls help me....
 
9 comments
Are you planning to have only 2 servers OR 3 servers (2 webservers and 1DB)? If you are looking only for 2 servers out of which 1 will be used only as a DB server, then all users will end up on the server in Asia.

To connect to the DB server, you have to grant all the permissions to the Asia server IP on the DB server, i.e. on the Mysql prompt of DB server, run the following;

grant all on dbname.* to 'dbuser'@'asiaIP' identified by 'dbuserpass';

You have to execute this command on the DB server.
 
i am planning to have two servers, not 3. my primary server will be the one in europe.

thanks for the reply.

what abt thr redirecting the users based on region?? i.e. euopean users to europe server and asians to asia.
any idea?

more over. i want to install forums and blog on both server under one domain. wat is the host name should i give while installing the DB config for both. say alll DBs are in european server...
 
For redirecting the users, install the mod_geoip module in Apache. It has its own database and you need to set the country_code and country_name to redirect the users. Read more: http://www.maxmind.com/app/mod_geoip

On the DB server, the hostname should be 'localhost' and on the Asia server, it should be the DB server IP.
 
thanks for the tip on mod_geoip. but the tut is for redirecting to two different sites. but i m planning to have two servers under one domain and the setup i m looking for is to balance the loads on server. and the sites are like mirrors... if one goes down i can use the other till the failed servers recovers...


now do you get my point??


regards,
cyberchennai
 
Right, you didn't mentioned about the load balancing before and now you are also stating that you need 100% uptime. In short it cannot be achieved with 2 servers.

Load Balancing :: You will have to setup a third server which will receive the actual requests and it will then redirect those requests internally to your 2 webservers to balance the load.

You cannot have 100% uptime as you are planning to host the DB only on one server. If that servers goes offline, your website won't work even if the Asia server is online.

I think you should decide what exactly should the setup be.
 
Your idea is not possible as your main server which would be executeing the web files would be on one server.....

Unless you do a name server balance which your domain would use two different name servers which are connected to 2 different servers for dns balancing and this would basically just direct country users to the ip faster. As each server (cpanel style) would point useing A records.

Best choice would be to do something like
us.domain.com
asia.domain.com

Make US and Asia and the main domain direct country ips to where they need to go. The US and Asia subs would have the same files connecting to one main db, but would be located on two different servers.

CDN is only useful for serving images and files faster. But whats the point if the user cannot connect to the server fast enough to actually get the actual html to show fast enough to point to CDN links.
 
Status
Not open for further replies.
Back
Top