vesoft-inc / vesoft-inc/nebula-java

auto rebalance sessions

Open
#613 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.