Open rustatian opened 3 years ago
Looking forward to MySQL and Redis connection pool
Redis is already there if you use it as KV storage.
Would it be possible to implement non-blocking solution? Send multiple queries and wait for response afterwards. Or this is more like proxy?
Would it be possible to implement non-blocking solution? Send multiple queries and wait for response afterwards. Or this is more like proxy?
Yep, this is a very famous optimization technique. As you can see here: https://www.techempower.com/benchmarks/#section=data-r20&hw=ph&test=query (point your attention to the lithium and drogon) first places occupied frameworks with batch queries. I'm not sure about the time, how long it costs us to develop such a plugin, but the idea is to support much more features, than just a simple proxy :)
Also, the design stage for this plugin will be closer to the end of the year.
Design a plugin that will solve a problem with Postgres (will be first) connections for the PHP workers. At the moment PHP has to use
pgBouncer
or other tools to initialize a pool of the connections and then re-use them. The idea is to have a plugin that will provide a pool of connections to the PHP. PHP will send a packet to a local listener, then the plugin will take a free connection from the pool, redirect that packet to the Postgres with a reply to the caller.