Profiling PHP Connections - Pool vs No Pool
Creating connection in efficient way is important, specifically if you are writing a consumber website that targets thousands of concurrent visitors. In this post I would share some performance statistics of creating connections using connection pool and without using connection pool. To see the performance difference, I created 100 connections without using connection pool and another 100 connections using connection pool. Here I show you the average time of creating one connection. I repeated same process 10 times, here are the states: Time to get one connection at localhost, in milliseconds. Without Connection Pool | With Connection Pool 9.37 | 0.99 ms 11.06 | 1.02 ms 10.48 | 0.77 ms 10.82 | 0.81 ms 10.13 | 0.81 ms 11.49 |