问题
I have 10 application servers and 1 mysql database. I would like to do connection pooling for mysql, but simply enabling mysql_pconnect() will not work since it'll cause some servers to have more connections than others.
What's the best solution for this scenario..?
回答1:
Why do you want to use persistent connections?
They are likely to cause trouble and will not improve performance noticeably (in all likelihood).
Run some performance tests on production-grade hardware in your lab, and you'll see.
来源:https://stackoverflow.com/questions/2252612/mysql-persistent-connections