scylladb / scylladb/alternator-client-javascript

Node-size awareness (for token-unaware load balancing)

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
6h 45m
Merged PRs (30d)
5

Description

This issue is about the client-side load balancer needing to send fewer requests to smaller nodes than to bigger nodes.

Although in the past we recommended that a Scylla cluster should contain many identically-sized nodes, we've recently reversed this recommendation:

  1. With tablets, it's easy and natural to support different-sized nodes. A half-sized node to get half the tablets - and therefore half the storage and half the work - of a double-sized node.
  2. Different-sized nodes allow much finer granularity in cluster growth: If we have a 3-node cluster, one node on each rack, and want to grow it by adding same-sized nodes, the minimum growth we can achieve is doubling the cluster to 6 nodes. If we allow adding a smaller node to each rack, we can grow the cluster at smaller increments.

If we implement token-aware load balancing, we will support the different-sized-nodes case automatically: Smaller nodes will have fewer tokens, i.e. fewer tablets, so will get fewer requests.

However, until token-aware load balancing exists, we need a different solution to support different-sized nodes.

What we can do is for the load balancing library to figure out the size of each node and instead of picking a node uniformly from the list of live nodes, give larger nodes a higher probability of being picked. We could expand the /localnodes response, perhaps if given a new optional parameter, to return the size of each node, or alternatively the load balancer could figure out the size of each node by other means, reading tablets system table or REST API. Perhaps can use the number of shards on a node as a good estimate of its strength. The number of tablets on each node is probably an even better criterion, if we assume that Scylla already tries its best to distribute tablets according to the strength of of the nodes - because our state-of-the-art tablet-aware CQL drivers will balance the load according to these tablets.

Jira:

Contributor guide

Open the contributing guide

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 with the /localnodes response described in the issue, then review DRIVER-555 and DRIVER-42 for the intended driver scope. Compare the proposed node-size signals, such as shards or tablets, and define how the client should weight live-node selection; done means the token-unaware load balancer sends proportionally fewer requests to smaller nodes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.