How to configure one website on multiple servers. Load Balansing. LINUX

Discussion in 'Apache' started by hakzona, Dec 4, 2009.

  1. #1
    Please i need help! :confused:
    Can someone explain me how all these big websites are working?
    My website is going over rating and recently started crashing because of load on server. Can someone explain me how i can configure and connect one more webserver to balance the load on website?

    I know it has to be something about round robin dns or load balancinf, but can you actually explain it or give a tutorial on how to do it step by step.

    I would really appretiate that.
    Thank you.
    :)
     
    hakzona, Dec 4, 2009 IP
  2. Kwaku

    Kwaku Well-Known Member

    Messages:
    1,217
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    140
    #2
    First you should check why it is overloading; what is the bottleneck? Probably your site can be fixed to handle a lot more than it currently is with some tweaking.

    Load balancing (and failover) depends on what you are runnning; you need to change the software probably to support it.

    PM me if you want some help.
     
    Kwaku, Dec 6, 2009 IP
  3. hakzona

    hakzona Member

    Messages:
    89
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    #3
    Well, website is under wordpress, so it gets overloaded by php and shows time out. I just switched it to DSO, but now Mysql gets disconnected. Its like circle with no way out
     
    hakzona, Dec 7, 2009 IP
  4. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #4
    big websites may use load balancing

    a technical easier way would be load distribution

    NO new software needed
    no major changes

    it all would run on 2 or more servers being alternately selected using nameserver round robin (using bind9)
    Google for it - its the easiest way to distribute load
    then however you may also need to create one master mysql on one site and have the other server connect as slave to the master db

    you do this after you have done all other optimization
    including memory cache etc
    and including keeping all bad stuff OUT of your site/apache using iptables

    normally such as load distribution NEED occurs somewhere when you have definitely MORE than 30'000 to 40'000 unique visitors or more than 30-50 GB daily traffic ...
     
    hans, Dec 8, 2009 IP