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

add pool FILO mode #589

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

add pool FILO mode #589

wants to merge 1 commit into from

Conversation

tangtj
Copy link

@tangtj tangtj commented Dec 24, 2021

No description provided.

@tangtj
Copy link
Author

tangtj commented Dec 24, 2021

#571

@stevenh
Copy link
Collaborator

stevenh commented Dec 25, 2021

There is already a #571 for this. The same issue applies to this is that this breaks connection cleanup and is only needed to solve a problem outside of this package.

If I missed how this avoids the issue I’m all ears. However there is also the additional data race if the LIFO variable was ever changed on the fly.

With the current lack of a functional arg constructor, which would require a major version bump, I’m not sure there’s a way to fix 😞

@tangtj
Copy link
Author

tangtj commented Dec 25, 2021

thanks you.
We consulted the technical staff of the cloud vendor, and the solution given is this method. I am willing to participate in the follow-up and solve the related problems.

@stevenh
Copy link
Collaborator

stevenh commented Dec 25, 2021

Happy to consider options but from what I’ve read about the situation it would need a more situation aware solution to fix properly.

@stevenh
Copy link
Collaborator

stevenh commented Dec 31, 2021

I wonder if the best fix for this would be to limit the connection lifetime, which would force rebalance over time?

@tangtj
Copy link
Author

tangtj commented Jan 1, 2022

If the lifetime is very short, Pool will be created and closed conn frequently. The use of pool is meaningless and is equivalent to creating a new conn every time. If the time is longer, for example, 20 seconds or 1 minute,Then the rebalan is has no effect,unbalanced state transfers on different connection,single unbalanced connection will still become the overall performance bottleneck。

@stevenh
Copy link
Collaborator

stevenh commented Jan 4, 2022

That would only be the case if the LB isn't doing it's job properly, and if that is the case no fix will work.

From what I understood the balance issue only occurred where there was an issue, hence a 1min max connection lifetime would enable it to only be unbalanced after said issue for 1mins, which would maintain the full benefit of the pool?

@stevenh stevenh mentioned this pull request Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants