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

Merge connection pools in vttablet component using taskPool #563

Open
earayu opened this issue Oct 30, 2024 · 2 comments
Open

Merge connection pools in vttablet component using taskPool #563

earayu opened this issue Oct 30, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request feature good first issue Good for newcomers

Comments

@earayu
Copy link
Collaborator

earayu commented Oct 30, 2024

Background

Currently, the vttablet component has multiple connection pools for various tasks, leading to complexity and potential performance issues. To streamline and optimize this process, it is proposed to consolidate these connection pools into a unified taskPool.

Proposal

The proposal is to merge the existing connection pools in the vttablet component into a single taskPool. This consolidation will simplify the codebase, improve resource management, and enhance overall performance.

Step 1: Identify All Connection Pools

We can locate all connection pools and their active connection counts through vttablet's http://localhost:15100/metrics endpoint.

Connection pool metrics end with _active, so we can filter these metrics using a regular expression:

curl http://localhost:15100/metrics | grep -E "^\w+_active.*"

Step 2: Locate Code by Pool Names

Taking vttablet_health_streamer_active 1 as an example, we can search for "HealthStreamer" in the codebase. (Note: Convert characters after underscores to uppercase)
This will correspond to a connection pool named "HealthStreamer".

Step 3: Migrate Components to taskPool

Replace each component's connection pool with taskPool on a case-by-case basis...

@earayu earayu added enhancement New feature or request good first issue Good for newcomers feature labels Oct 30, 2024
@jairuigou
Copy link
Contributor

I'd like to merge the connection pool of HealthStreamer as an example, and then handle the other components

@earayu
Copy link
Collaborator Author

earayu commented Nov 3, 2024

I'd like to merge the connection pool of HealthStreamer as an example, and then handle the other components

It seems to be a good start, you can create a sub-issue. @jairuigou

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants