How to optimzied Apahce server for High Traffice site

Discussion in 'Apache' started by zahidraf, Mar 16, 2011.

  1. #1
    I would like to know how to optimized my Apache server for heavy traffic sites

    I am running site on a dedicated and sties goes down when some high traffic come

    currently, I have a limit of 500 Apache connection limit
    I have a server Core 2 quard with 3 gb of RAM

    Any one suggest ?
     
    zahidraf, Mar 16, 2011 IP
  2. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #2
    Hello there,

    There is not one magic solution for this. I would suggest though that you ensure you have use a PHP caching engine, such as eAccelerator or APC, if you sites are PHP driven. If you have a MySQL driven site as well, you would need to optimize your my.cnf (assuming you are using Linux) for your queries as well. There are many things you need to look at. If you are comfortable doing this yourself, I suggest you start "googling" on Apache optimization.

    Chris
     
    RHS-Chris, Mar 16, 2011 IP
  3. more_sem

    more_sem Peon

    Messages:
    299
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Its best to first optimize the code, there is hardly much that you can do with the server. You can employ CDN for serving content, that is one way to lower server load,make the page load faster.
     
    more_sem, Mar 17, 2011 IP
  4. zahidraf

    zahidraf Well-Known Member

    Messages:
    450
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #4
    Currently, I am running site on a dedicated server

    2x Xeon Quad Core 2.0GHz with 8gb of ram

    only issue when some heaving load on the site, Apache is overload and some of services got failed and sever down.

    currently Max client is =600

    Any suggestion ?
     
    zahidraf, Mar 19, 2011 IP
  5. rod.maqstuirt

    rod.maqstuirt Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Is there default apache instalation? If it is, then apache is working on prefork mode (httpd -l and check modules installed, or httpd -V), for high traffic I recommend using MPM Worker module for apache. And optimization of course, gzip your output, minify and gzip javascript and CSS.
     
    rod.maqstuirt, Mar 20, 2011 IP
  6. drewtoby

    drewtoby Well-Known Member

    Messages:
    763
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #6
    Upgrading the computer may help, I am not completely sure though.
     
    drewtoby, Mar 23, 2011 IP
  7. manojsamtani

    manojsamtani Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Fully Agreed with you but we also need to optimize apache with keep alive, max connections and needs to check how much apache process consuming server memory, according to that we can decide how many connection server can handle.

    As well as need to customize Kernel Network parameters, keep alive and tcp variables.

    On PHP side need to we can use Memcache for storing mysql queries n login sessions.


    Thanks and Regards,
    Manoj Kumar

     
    manojsamtani, Mar 24, 2011 IP