Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider should use connection pooling or single transaction to minimize load on database when reconciling #195

Open
ajcaldera1 opened this issue Sep 25, 2024 · 0 comments · May be fixed by #197
Labels
enhancement New feature or request

Comments

@ajcaldera1
Copy link

What problem are you facing?

If I have hundreds to thousands of objects to be reconciled, opening a new connection for each aspect (Privs,Perms,Connections) creates unnecessary load to the database instance and can exhaust available connections. Let's say that I had dozens to 100's of roles to reconcile, I would end up creating for each user:

1 connection for CREATE ROLE xxxx PASSWORD yyyyyy ppppp
1 connection for ALTER ROLE xxxxx PASSWORD yyyyy
1 connection for ALTER ROLE xxxxxx pppppp
1 connection for ALTER ROLE xxxxxx RESET ALL, and Configs in transaction block
1 connection for ALTER ROLE xxxxx CONNECTION LIMIT zzzzz

If the reconciler runs every 5 minutes, I would be churning thousands of connections per hour.

How could Crossplane help solve your problem?

Implement role provider with connection pooling (standard golang bindings are fine) and/or use ExecTx for all elements of each user.

@ajcaldera1 ajcaldera1 added the enhancement New feature or request label Sep 25, 2024
@ajcaldera1 ajcaldera1 linked a pull request Oct 15, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant