scylladb / scylladb/alternator-client-cpp

PrivateLink support

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

Nobody has claimed this yet.

Dominant language
C++
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Jira task: https://scylladb.atlassian.net/browse/DRIVER-358
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

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 by reading the linked Jira task and the core and cloud PrivateLink design references, then inspect the repository for existing connection and endpoint configuration entry points. The issue is complete when the C++ client supports the described PrivateLink deployment and its initial and node connection flows, with coverage for the resulting behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, cpp
Domain
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.