Aung Aung Swe
Aung Aung Swe

Reputation: 262

How to prepare for mySQL too many requests?

Thanks for taking time to my problem.
I am new to MySQL.

My problem is I want to make many (about 1000 clients' requests) select/insert queries to a MySQL database within a second.

I found there is a proper limit on it about 250-500 concurrents or there will be unhandled hardware over usage of server if there is no limit.

But I need to run about 1000 concurrent queries within a second.

And I searched for my problem and I found Master/Slave method (but I've not understand it well). And I am having to ask for it, if I split Read to slave, and Write to Master, how about concurrent connections will be solved, Please if you could explain it in detail, thanks in advance.

And I think 1000 requests at a time is not a heavy range. so I think there would not be hardware over usage for my server. Could you please suggest me for my problem.

The main language using is PHP. I am currently trying to solve it with creating a json files as replicates of database and clients' select requests will go to them. Server scripts refresh them per 3 seconds. May I know it is a good or very bad idea to solve this problem.

Upvotes: 4

Views: 2799

Answers (1)

bobomam
bobomam

Reputation: 58

Basically number of IOPS (Input/output operations per second) is limited by your hardware (how fast and big is your hard drive, how many GB of RAM do you have and how fast CPU do you have).

In your question you are asking for concurrent connections and number of queries per second. This are not the same things.

The maximum permitted value for number of simultaneous connections is 32 767 as you can see you are not limited in any way by database engine.

There isn't any fix limit of maximum queries per second if you are thinking about database engine. However as I mentioned at the beginning you are limited by your hardware.

You need to be aware that one simple select question is much faster to execute then complex select question with multiple joins.

To sum up. If you have fast enough server 1 000 queries per second is not a problem.

Upvotes: 1

Related Questions