php - How to handle concurrent DB connections by multiple users using PDO in PHP5 -
I want to use the PDO in my application. Although I am confused about the use of PDOs because my application usage targets are numerous users. Let's say it's 100 users together, so, as I read about PDO, it will create a 100 db connection to access. This can cause a problem because it will limit the concurrent connections allowed by the server. And new users will get a connection error.
How can I use the PDO in such a way that it handles concurrent connections and does not overhead?
100 concurrent users although this is not an effective number. The average user clicks once a minute, we have 100 connects for 60 seconds, which makes 1.5 connect / seconds.
A well written app should no longer be 0,1 seconds. Meaning 10 connections can fit in each other and we have 1.5.
Yes, it can sometimes fall on top, but by the way, the number of connections allowed will be the last thing that I will think. Due to improper sequencing and architecture, your database may be killed before reaching the limit.
Comments
Post a Comment