0

I do not ask for comparison. I already know what PostgreSQL and MariaDB is and differences.

I am looking this issue from another point. Such companies like Facebook uses MySQL (of course patched) but how can they handle millions of requests?

To be more clear; PostgreSQL has PgPool tool that caches and Re-Uses current connection for everyone as much client datas are the same. So, when a PHP application connects to PgPool 10.000 times, it actually uses few connections. This makes PostgreSQL available to millions of users at the same time without max connection error.

But on MariaDB/MySQL there is a max_connection setting points to 150. Is it means only 150 client can connect to MariaDB/MySQL from same PHP Web Page? What should I do to handle for example millions of request from PHP to the MariaDB? If 2 millions of users login at the same time to my site what will happen if my max_connection is 150? Or, Better, Is there any equivalent for MariaDB like PgPool?

What kind of scenario would I apply in this situation?

xangr
  • 144
  • 4

1 Answers1

1

Mysql (combining with php) reuse a connection always when the connections it's already open of course. So you have to consider your average query time (gen. 1 millisecond but it depends from your DB) and I hope great prosperity to your business, but 150 connections = 150*1000 =150kqps ... I think it's just good enough! I hope I gave you a good explanation.

P.S. For understanding your current situation run this command on your db:

SHOW STATUS WHERE `variable_name` = 'Threads_connected';
Francesco P
  • 321
  • 1
  • 7