MySQL Database Scalability

MySQL Database Scalability

Many web applications bottleneck at the database level. There can be many reasons for this and you want to make sure you’ve looked at a few items before you spend thousands on a bigger, better machine.

If you’ve peeked at the sample MySQL config files, you probably have noticed that they don’t start with very high values. Even if you’re running a few services on one machine, you are going to want to bump up several variables to make good use of your hardware. Balancing the number of Apache user connections to MySQL user connections is also very important.

Efficient, optimized queries are actually more crucial than performance tuning. Understanding how your database makes use of indexes is also critical. MySQL uses at most one index per query so you need to make sure that you created it correctly for it to be used.

If you’ve addressed the above issues and you’re still having issues you may be forced to buy new hardware. If you have a write intensive application then you will be looking at upgrading whatever your server’s bottleneck is. MySQL Cluster might be an option but there are several limitations with it. If you’re like most of the other web sites out there then you probably have a very high read to write ratio. Many sites have about 99 reads to every 1. For these scenarios, replication is a great option. With several slave servers that handle the non-write queries, you can distribute your load over a group of servers and create redundancy at the same time. Unfortunately, load balancing SQL queries isn’t quite as simple as load balancing HTTP traffic so you’re going to have to do some homework.

Related Articles


Accessibility on the Modern Web

There’s been a lot of buzz in the news lately about accessibility, specifically in reference to the dozens of ADA lawsuits that seem to be more and more...


Automated Visual Regression Testing

What is automated visual regression testing? The name sounds scary, but in reality, the idea is fairly simple. If you have a user interface (UI),...


Automated Testing Tool Comparisons

Automated testing is rapidly gaining popularity across the web development field, and as expected, the number of automated testing tools is growing rapidly as well....