Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Shared pool #12

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Shared pool #12

wants to merge 3 commits into from

Conversation

ckoehn
Copy link
Member

@ckoehn ckoehn commented Apr 23, 2018

This pr introduces a shared connection pool, on the driver level, for all festung queries. Previously we were using one session per user/request (update: I think this sentence is wrong. We create one session per thread.) . This seems to be unnecessary overhead, because we are always connecting to the same festung host and can re-use the tcp connections to speed things up.

This pr also introduces a one-time retry behavior, because we are having quite some ConnectionError entries in sentry.

One additional optimization is to make the interface of the Connection backwards compatible by adding a session kwarg or accepting just **kwargs.

Any kind of input is highly appreciated 馃槈

Copy link

@scruplelesswizard scruplelesswizard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I can validate the code, but the concept sounds solid! Thanks @ckoehn!

Copy link
Contributor

@dermorz dermorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try this with a locally running festung used in the tests.

Copy link

@berend berend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

4 participants