What is considered a normal or heavy load for a MySQL-backed website?

I’m at approximately 10% completion of my website development and I’m trying to assess the load that my database is experiencing. When users log in, multiple functions are invoked each minute and each page visit requires fetching various data elements, like lists of area codes, states, and countries, to assemble a registration form. I believe I could optimize some tasks using PHP to reduce database interactions.

After running for 6 days, 14 hours, 57 minutes, and 58 seconds, I recorded a total of 120,998,563 queries, which equates to an average of around 12,690 queries per minute and 211 queries per second. I’ve noted a peak of 79 concurrent connections, but the last two statistics seem unclear. Additionally, my data usage shows 133 MiB received per hour and 1,997 MiB sent per minute.

that’s an interesting workload scenario you’re dealing with! I’m curious, have you considered distributing some of th load using caching mechanisms or perhaps a Content Delivery Network (CDN) for static content? How might leveraging database replication or clustering affect your current setup? any thoughts on that?

In my experience, it’s crucial to first assess whether all the queries run are truly necessary or if some can be optimized or combined. Examining your query structures and possibly using indexing for frequent search columns could significantly reduce load times. Also, employing query caching can reduce redundant processing by storing the results of frequently accessed queries. You may also want to consider load testing with simulated traffic to forecast potential scalability issues. With proper indexing and optimization, your costs could be controlled while enhancing performance.