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

Maybe switch to local pool DbHandler strategy #311

Open
4 tasks
chasers opened this issue Feb 21, 2024 · 0 comments
Open
4 tasks

Maybe switch to local pool DbHandler strategy #311

chasers opened this issue Feb 21, 2024 · 0 comments

Comments

@chasers
Copy link
Contributor

chasers commented Feb 21, 2024

Seeing a lot of busy_dist_port messages due to TCP connections between nodes being saturated or otherwise experiencing some packet loss or head-of-line blocking.

We should also reduce the number of hops to the database to reduce latency. -Just- need to share or acquire a global count of database connections.

  • Poll pg_stat_activity and cache Supavisor connection count on an interval
  • max pool size per node should be a function Node.list + 1 / sum of application_name filtered by pool_pid
  • application_name of DbHandlers should be something like Supavisor Pool - #{pool_pid}
  • Expire cache maybe 5 seconds?

Option 1

  • "primary" node with manager
  • need query rate per connection in manager
  • manager should be able to dynamically change pool size and calibrate pool size on each node
  • nodes with busier connections should have relatively more conns to the database
@chasers chasers changed the title Switch to local pool DbHandler strategy Maybe switch to local pool DbHandler strategy Mar 4, 2024
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

No branches or pull requests

1 participant