near / queryapi

Near Indexing as a Service
18 stars 3 forks source link

Remove Code Level Postgres Connection Pooler #749

Open pkudinov opened 5 months ago

pkudinov commented 5 months ago

Currently, QueryAPI uses two simultaneous Postgres pooling. One is pgBouncer and the other is PgPool. The latter is a code level connection pooler which is potentially no longer necessary. The removal of the code level pooler is necessary to enable Transaction Pooling mode in pgBouncer and ensure that all context.db calls for a particular indexer go through the same connection, which is necessary for transactions. In addition, it's possible that removing this secondary pooling can improve latency.

Relates to #340

duonghb53 commented 5 months ago

@pkudinov can I get this one?