vesoft-inc / vesoft-inc/nebula-java
auto rebalance sessions
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 199
- Forks
- 125
- Avg merge
- 5h 6m
- Merged PRs (30d)
- 3
Description
Introduction
On graphd/storaged reboots/failures, we observed that QPS skews toward remaining living servers, and QPS are never balanced again without intervention(client reboot, network fluctuation, etc).
The more servers we have, the lower the probability that a new session is created on a recently started server, because pos is only an index.
This undermines the purpose of a distributed database.
Proposal
Implement a new priority queue based on existing connections count for graphd server to replace pos, enabling each client to balance connections across all available servers. (I believe this would serve as a suitable default configuration.)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in client/src/main/java/com/vesoft/nebula/client/graph/SessionPool.java at the pos reference and review how sessions are assigned to graphd servers. Implement the proposed connection-count-based priority queue, with completion meaning new sessions rebalance connections across available servers after reboots or failures without client intervention.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100