0

I am working on a website for movie reviews. In the current design, the front-end( jQuery, HTML, CSS) connects with the model (individual php scripts which deals with MYSQL database) for basic storage and retrievals. This trivial design will work for small traffic.

My concern is how to tackle problems related to heavy traffic with many requests coming in at the same time. What are the design changes i should do to the model part to handle heavy traffic and make the system scalable?

PS: please let me know if you need more info.

Thank you

s2n
  • 327
  • 3
  • 9
  • Please specify what kind of requests you have. Do you have a lot of database inserts per second, or they are selects? What database you use? Is this mysql? How big database is (gigabytes)? You should look at system load when high traffic come and see which process uses a lot of cpu time (httpd? mysqld?). – Kamil Feb 22 '12 at 14:13
  • yes. lots of insert requests per second. I am using MYSQL – s2n Feb 22 '12 at 14:19
  • My concern is more of a general one. Things i should focus on when designing a system expecting heavy traffic at some point. – s2n Feb 22 '12 at 14:20
  • So you should focus first on indexes in table where data is inserted. Indexes slow down inserts significantly. I dont say "remove indexes", just saying that you should focus on them. This is not so simple and there is no simple answer for your question. Read any good book about databases. You can start from "Indexes" chapter, but i recommend you to read whole book. High load databases are not for amateurs and you should become more professional - go and learn :) – Kamil Feb 22 '12 at 14:21

1 Answers1

1

http://redis.io/ - Redis allows your database to be memory-resident with lazy writes back to disk. This greatly improves DB performance. Pour in a bucket of RAM first. Memcached is also a popular tool, but not as feature-packed.

Diodeus - James MacFarlane
  • 112,730
  • 33
  • 157
  • 176