Loveleen Kaur
Loveleen Kaur

Reputation: 993

Scaling MYSQL database for a multi site Drupal installation with 20,000 visitors per day

I have a multisite Drupal installation with about 20 urls pointing to the same code base and a common database. I have around 20,000 visitors visiting all sites daily which I hope would increase.

I am using 2 servers currently- one being the webserver Apache 2 on Linux Platform and the other is the database server- MYSQL.

Offlate my MYSQL server is being unable to handle the load and starts behaving erratically - sometimes issuing warnings, sometimes not returning data, sometimes timing out. I have tried all optimizing techniques but the problem has seemed to increase.

I would be very thankful if someone could suggest me a solution to the problem. Would doubling the capacity of server help or should I head towards using a cluster or cloud? Also would a clustered web tier with load balancer be useful or just using a clustered db with optimization is a viable solution?

I came across this site http://www.johnandcailin.com/blog/john/scaling-drupal-open-source-infrastructure-high-traffic-drupal-sites . However I am confused about which architecture to choose

Upvotes: 1

Views: 539

Answers (1)

Mad Scientist
Mad Scientist

Reputation: 18553

Caching! Caching! Caching!

If you have a not so frequently and relatively static website with mostly anonymous users, Boost will dramatically increase performance. Boost is a static page cache, so any hits on the cache will completely bypass Drupal.

If you have more logged in users, you should set up Memcache, which also avoids the database.

Installing APC is always a good idea, but it won't really help you here, if your bottleneck is the database.

Additionally you can use the Devel module to check the queries generated by Drupal and try to optimize some stuff there, e.g. disabling inefficient or misbehaving modules.

Upvotes: 2

Related Questions