Activity Stream
48,167 MEMBERS
6838 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23

Hybrid View

BattleDuty Multiple servers. 24th Mar 2012, 05:22 AM
Apathetic Maybe this will work: Point your... 24th Mar 2012, 05:26 AM
BattleDuty I should point NS1 to server 1 +... 24th Mar 2012, 05:32 AM
snowmanrene With that nameserver concept it... 24th Mar 2012, 05:43 AM
saninokia what about the site database dude? 24th Mar 2012, 05:50 AM
BattleDuty I got 1 VPS and 1 Dedicated... 24th Mar 2012, 05:57 AM
wdc I alas dont know full tutorial how... 24th Mar 2012, 09:19 AM
BattleDuty ^^So if I have same DB on same both... 24th Mar 2012, 02:03 PM
Gavo This site is using a hacked... 24th Mar 2012, 02:05 PM
BattleDuty ^^It's not actually about load... 24th Mar 2012, 02:07 PM
MediaStar then how u update both website at... 24th Mar 2012, 02:23 PM
Desi_Boy use cloudflare , ur website remain... 24th Mar 2012, 02:25 PM
BattleDuty ^^How?? I see "Site is... 24th Mar 2012, 02:27 PM
damoncloudflare CloudFlare Always Online 26th Mar 2012, 09:48 PM
Desi_Boy http://www.cloudflare.com/plans , i... 24th Mar 2012, 02:29 PM
BattleDuty ^^Thank you so much :) It's listed... 24th Mar 2012, 02:35 PM
damoncloudflare CloudFlare Captcha 28th Mar 2012, 07:32 PM
digitallifeseff afaik cloudflare it's only cache... 24th Mar 2012, 02:42 PM
Lock Down This is what is normally used for... 24th Mar 2012, 03:00 PM
snowmanrene If you're with OVH, they have a... 26th Mar 2012, 09:54 PM
Hotaru I have few expriences in this... 27th Mar 2012, 05:00 AM
JamesVaporH What your looking for is a... 27th Mar 2012, 06:05 AM
Whoo Most of the time you have 2 servers... 27th Mar 2012, 07:01 PM
Previous Post Previous Post   Next Post Next Post
  1.     
    #1
    Member
    I have few expriences in this field. If you have less/or equal 4 servers, it's best to setup 1 instance of MySQL. More than 4 servers, 2 mysql run in replication mode (one master and many slaves). Why? In high traffic website (I'm talking hundreds thousands visits in day or more) MySQL use a lot of RAM and CPU, try to seperate it from PHP and WebServer for best performance.
    If you have more than 2 web server, and one extra for mysql, use the extra one for load balancer. The best software load balancer out there is nginx. You can config nginx to balance the request to your 2 web servers. If one web server goes down, you still have the other.
    Now, for MySQL. If you have mysql run in replication mode (means 1 master server, and many slave), config for each web server connect to different mysql server. Now, if you have only 2 mysql server (1 master & 1 slave), you can config you web server read from master. If you have more than 3 (1 master & 2 slaves), do not config your web server to read from master, only read from slave. Any modification operation happens to database (UPDATE, INSERT, DELETE) you will have to perform on the master, and those modifications will be mirrored to slave. If you perform modification operations on slave, it will not change the master and other slave, go figure.
    Next thing is PHP Session. Now, you have more than 2 web servers, each one will give the client different session id, and (maybe) store different session data. So, we will have to store php session in one place. There are many ways to do that: file, mysql, memcached, redis... Now, forget the session to file solution, one reason: it sucks. Well, the easiest way is to store php session in mysql. But the best way is to store in memcached, which is lightning fast.
    Code: 
    Memcached: http://pureform.wordpress.com/2009/04/08/memcache-mysql-php-session-handler/
    MySQL: http://www.tonymarston.net/php-mysql/session-handler.html
    Last word: there are many solution to scale a website, those things above i points out are just few, and I'm gladly to share my exprience.
    And one more thing, in nginx load balancer, there are 2 ways to load balance between servers:
    1. Equally divide: client make 5 requests to your webserver (assume you're load balancing between 3 web servers), load balancer will do like this: request 1 go to svr A, req 2 go to svr B, req 3 go to C, req 4 go to A, req 5 go to B. Pros: CPU + RAM load is balanced. Cons: different session.
    2. Stay in one server: client 1 make 5 requests, load balancer forwards all request to svr A and all further request will go to svr A. Client 2 make requests, all will go to svr B. Pros: no session problems. Cons: one svr may have more stress than the others, and when one go down, one other svr will take all the stress from the down svr, and there will be a chain reaction.
    Hotaru Reviewed by Hotaru on . Multiple servers. I want to know about single site and multiple network. That is, can I host 1 site on 2 servers? If one goes down, site continues to work from other one. Say A is the site with X and Y IP . Then I add both NS. Will this work or? Thank you! Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Banned
    Website's:
    vaporhostn.com
    What your looking for is a replication server.

    The replication server can be turned into a production server or a write only server (replication).

    If for any reason the first server goes down then you can turn the replication server to production.

    All the replication server will do is copy each and every change you make on the other server to the new one. But its not a easy task as it needs custom scripts.

    You can also run a cluster server in which each server connects to each and it will work like a replicated server. But that is something i cannot explain as the documentation is needed since detail is better then just a summary.

  4.     
    #3
    The Wise One
    Website's:
    twilight.ws ddlrank.com
    Most of the time you have 2 servers of each:

    2 load balancers (1 active and 1 in standby mode) => this means you have one floating IP which routes to the active load balancer

    eg:

    load balancer 1: 192.168.0.1
    load balancer 2: 192.168.0.2
    floating IP: 192.168.0.3

    All websites will point to the 192.168.0.3 which will then automatically switch (google for ucarp) to the active load balancer.

    Mysql will be master/slave of which the slave can take over if the master may crash. Master/slave is still not 100% so if you get corrupt data on the master it will write it to the slave too causing you to have bad data on both servers

    Ive read my stuff here: http://insanecoderz.org/359/server-a...r-debianubuntu

Page 3 of 3 FirstFirst 123

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Multiple Servers With Different Control Panels?
    By bnehost in forum Hosting Discussion
    Replies: 10
    Last Post: 19th Sep 2012, 06:45 PM
  2. Replies: 2
    Last Post: 22nd Feb 2012, 07:41 PM
  3. Multiple Sites With Multiple Domains On Shared Hosting?
    By DuckBre in forum Webmaster Discussion
    Replies: 6
    Last Post: 24th Aug 2011, 03:47 AM
  4. Use one domain with multiple servers
    By Ruriko in forum Server Management
    Replies: 3
    Last Post: 2nd Aug 2011, 11:37 AM
  5. Replies: 3
    Last Post: 22nd Jan 2011, 02:57 AM

Tags for this Thread

BE SOCIAL