scylladb / scylladb/alternator-client-javascript

PrivateLink support

Open
#28 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

Jira task: https://scylladb.atlassian.net/browse/DRIVER-361
Jira epic: https://scylladb.atlassian.net/browse/DRIVER-54

Copied from Jira epic DRIVER-54:

Idea

Enable dynamodb clients to work properly via NLB PrivateLink

PrivateLink, for the drivers is a load balancer that is deployed for a rack or dc (common case), every node in given scope (rack or dc) is going to have distinct port on this load balancer.

This load balancer will also have one port that targets all the nodes, for initial connection.

Initial connection flow

Driver

Driver configuration

Code example:

/// Information about a PrivateLink deployment for a cluster/node.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PrivateLinkEndpoint {
    /// Cloud-specific connection identifier
    pub cloud_connection_id: String,

    /// Either DNS name or IP address exposed for this PrivateLink connection, could be empty if private link is deployed with custom CNAME.
    pub endpoint: String,
}

/// Top-level configuration holding all PrivateLink deployments.
#[derive(Debug, Clone, PartialEq, Eq, Default)]
pub struct PrivateLinkConfig {
    pub endpoints: Vec<PrivateLinkEndpoint>,
    pub discoveryPort: u16, // Default is 9042
}
Node operations

When node is added, another distinct port is opened on the load balancer for the node.

When node is removed, port is also decommissioned.

Since there is no way for a client to know to which node it is connected to, we will require from cloud to not to reuse same port when node is removed and added right away.

References

Core design doc: ref

Cloud design doc: ref

Network Diagram:

Migrated from GitHub issue: https://github.com/scylladb/alternator-load-balancing/issues/161

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 linked Jira task and the referenced core and cloud design documents, then inspect the client's existing connection and configuration entry points. Define how the initial discovery connection, per-node ports, endpoint configuration, and node add/remove behavior should work. Done means the design is agreed and the required behavior is covered by implementation and tests, but no files or tests are named here.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.