Problem:
One of the sites I maintain has been getting more and more
traffic everyday. A very good thing for the site, not so good for
the solo server which is serving those pages. The site is VERY
dynamic with LAMP setup. We only have one server serving our web
pages to our users. Since its a dynamic site with PHP and MySQL,
it has a lot of load during peak times. Average load time of a
page is between 1-2 secs during normal usage, 2-5 secs under
average to heavy load.
During heavy load, we started to see our mysql stop responding to
requests which is a big concern for us since we don’t show
content if there is no db connection. We had to come with a
solution, fast, to prevent this issue from appearing.
Solution:
So here are couple things I ended up doing on the server side to
reduce load on this server without having to do much code change.
[Read more]