> On Tuesday, Nov 23, 2021 at 4:20 PM, Christopher Schultz 
> <ch...@christopherschultz.net (mailto:ch...@christopherschultz.net)> wrote:
>
> ProxySQL is, mostly, a load-balancing and caching product. Sure, it can
> provide connection-pooling, but that doesn't mean that you want your
> application making 1000 simultaneous requests to the proxy.
Could you expand on this? Connection pooling is a fundamental aspect of how 
ProxySQL operates, after all. I'm not familiar with how the DBCP connection 
pooling works, but what added value would it bring in this case? What does DBCP 
pooling at the application level achieve that ProxySQL wouldn't?

In case it's relevant, we're planning on installing ProxySQL on the app servers 
themselves, an approach generally recommended by e.g. Percona.

My main fear is that having two separate connection pools would make 
performance tuning at the pool level potentially nightmarish. We'd make a 
config change at the ProxySQL level, test it, and conclude that it didn't have 
a meaningful impact–when it actually might have, had there not been another, 
poorly understood (by us, that is) pool at play. DBCP has the potential to 
muddy the waters: even if it doesn't actively work against ProxySQL-level 
tuning, we can't really prove that it's not a contributing cause any time one 
of our ProxySQL config changes fails to improve performance.

> > I haven't been able to figure out how to entirely disable DBCP so
> > that ProxySQL could handle the pooling entirely.
> You can't. You'd have to tear-out the use of the JNDI-provided
> DataSource altogether which isn't worth your time.

Elsewhere in this thread, Mark Thomas said this in response to Olaf Kock, 
referring to his idea of a custom "non-pooling connection pool":

> > No need for this.
> >
>

> > DBCP looks exactly like a database driver to the application. So, rather
> >
> >
> >
>
> > than configuring DBCP as a wrapper for the database driver, you just
> >
> >
>
> > configure the database driver directly.
> >
> >
>
> >
> > The short version is:
> > - remove the pooling configuration from the resource definition
> >
> >
>
> > - change / set the factory attribute the the correct value for your
> >
> >
>
> > driver (probably com.mysql.cj.jdbc.MysqlDataSourceFactory)
> >
> >
>

Now, this probably shouldn't be taken as a recommendation or even a statement 
of practical feasibility. How do you view this option, assuming local ProxySQL 
installs on the app servers? You can still assume my complete ignorance about 
every element between the JNDI specs and the actual configuration statements in 
context.xml :-)

- JK

Reply via email to