The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

An site with lot traffic

Discussion in 'General Discussion' started by upsforum, Apr 26, 2007.

  1. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    HI ,

    I manage a site (only this site) in dedicated server, this site run high number query mysql, php and rewriteengine query

    This is detail of server:

    Pentium dual xeon 2.8 GHz
    3 Gbyte of RAM
    Dual HD SATA 160 GByte

    stats of site:

    Average hits per day 1.264.368
    Average pages per day 126.979
    Average unique per day 52.000
    Average bandwidth per day 11 Gbyte


    I search a solution for optimization the performance also buying a second server but I don't idea like manage two servers, in clustering? mysql on first server and apache on second server? you what suggests?
     
    #1 upsforum, Apr 26, 2007
    Last edited: Apr 26, 2007
  2. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
  3. gupi

    gupi Well-Known Member

    Joined:
    Apr 27, 2004
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    yes, having two servers with mysql on the second will give you a lot of freedom.
    It is nothing complicated, just attention.

    Ideally would be nice to have a secondary network card on each server server (gigabyte would be preffered) and have both servers directly linked via these cards.

    After copying the databases on the second server, you just have to modify the config files of the site, in order to look onto the other server and fine-tune the firewalls in order to let the two servers communicate.
     
    #3 gupi, Apr 27, 2007
    Last edited: Apr 27, 2007
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Clustering and load balancing the traffic between 2 servers would be the ideal solutions
    however you can also try to make a few optimizations and see if it helps any.

    Taking into account you have a Dual Xeon ...

    In your /etc/httpd/conf/httpd.conf file, make the following changes
    to the various respective configuration setting lines:
    Code:
    Set  "Timeout" to 10
    Set  "KeepAliveTimeout" to 5
    Set  "MaxKeepAliveRequests to 150
    Set  "MaxRequestsPerChild" to 500
    Set  "MaxClients" to 256
    Set  "ServerLimit" to 256
    Set  "SendBufferSize" to 131072
    Set  "StartServers" to 8
    Set  "MinSpareServers" to 16
    Set  "MaxSpareServers" to 32
    
    Save the file and don't forget to restart Apache and see if that helps
    your performance and load levels.
     
  5. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    thank you for your suggest but in my httpd.conf I don't match

    ServerLimit
    SendBufferSize

    I can adding??
     
  6. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    for ServerLimit apache get the error: module not included in the server configuration
     
  7. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Sounds like you have a minimally configured Apache installation ;
    In which case you can just omit the "ServerLimit" setting and the
    other configuration setting will still help irregardless.
     
  8. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    I had modify but the server status is invariant
     
  9. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    I don't have idea for who use clustering, you can suggest me various link for more informations?
     
  10. freedman

    freedman Well-Known Member

    Joined:
    Feb 13, 2005
    Messages:
    312
    Likes Received:
    1
    Trophy Points:
    18
    I havn't seen a "howto" for setting up "clustered" cpanel installations.
    time permitting, I'll be writing up one for the solution I currently use..but it's more specific for my personal situation.

    Basically, here's what I'm doing:
    running mysql in a Master-Master replication configuration (search google for how to do this).

    sync your web files/homedirectory to a 2nd server. (I use "unison" to do the synchronization and run it at a frequency which doesn't leave file system updates behind--if you're a mostly DB driven site with mostly static files, then this needn't be done very often--or can be done manually when the files are updated).

    copy the httpd.conf to the 2nd server.. modify any IP addresses to match those of the 2nd server instead of the first.

    now, put both IP's in the DNS for the domain in question, the DNS server that comes with cpanel will serve the IP's round robin.

    so, you'll get a pretty well load balanced solution on both servers.

    it takes a bit to get things set up.. mostly making sure replication is working and then tuning t'unison' time.

    there are some caveats to be aware of:
    if you're website updates files (or allows users to update files), then there are likely to be issues where the same file is updated diffferently on both servers, which will cause problems...so, as I stated, it's very specific to my situation, but it may help you think about options.


    I wont be able to provide more help until I get around to writing a 'how to' which wont be for a month or so.. (partly because I dont have time, and partly because i want to wait for cpanel 11 release to see what might change in the implementation)
     
Loading...

Share This Page