ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
    • Supported Driver Versions
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Search Ask AI
ScyllaDB Docs ScyllaDB Node.js Driver Client Routes (Private Networking)
For AI agents: a documentation index is available at https://nodejs-rs-driver.docs.scylladb.com/v0.7.1/llms.txt. A Markdown version of this page is at https://nodejs-rs-driver.docs.scylladb.com/v0.7.1/connecting/client-routes.md.

Client Routes (Private Networking)¶

When connecting to ScyllaDB Cloud clusters over private networking (e.g. AWS PrivateLink or GCP Private Service Connect), nodes are not reachable at the addresses they broadcast to each other. Each node is instead reachable through a proxy whose address is stored in the system.client_routes table. The driver has to be told to route through that table — that is what the Client Routes feature does.

How it works¶

  1. Each proxy is identified by a connection id — a string the cloud infrastructure assigns to a particular PrivateLink / Private Service Connect connection.

  2. On session startup, and on every metadata refresh, the driver reads system.client_routes to find which address and port to use for each node, filtered by the configured connection ids.

  3. The driver subscribes to CLIENT_ROUTES_CHANGE events, so it can pick up changes to the table without waiting for a full metadata refresh.

Usage¶

Provide a clientRoutes option alongside contactPoints:

const { Client } = require('@scylladb/driver');

(async () => {
  const client = new Client({
    contactPoints: ['my-privatelink-endpoint.amazonaws.com:9042'],
    localDataCenter: '<your-dc>',
    clientRoutes: {
      proxies: [
        { connectionId: 'my-connection-id' },
      ],
    },
  });

  await client.connect();
})();

Replace <your-dc> with the datacenter name reported by your cluster. This setting controls coordinator selection; it does not filter discovered hosts or client routes.

contactPoints is still required — use the address your cloud setup gives you for the initial connection. Contact points are never translated, which is what makes the first connection possible before any route is known.

Proxies¶

clientRoutes.proxies is a non-empty array; each entry identifies one ScyllaDB Cloud connection to read routes for:

Option

Description

connectionId

The ScyllaDB Cloud connection id. Used to filter the rows of system.client_routes that apply to this proxy. This is required.

hostnameOverride

Overrides the hostname that would otherwise be read from system.client_routes for this connection id. Useful for e.g. local testing.

More than one proxy can be specified when connecting, for example one per availability zone - pass all of them in clientRoutes.proxies.

clientRoutes: {
  proxies: [
    { connectionId: 'conn-id-az-1' },
    { connectionId: 'conn-id-az-2' },
  ],
},

Restrictions¶

clientRoutes is mutually exclusive with:

  • policies.addressResolution — client routes performs its own Host ID based address translation, so a custom address translator would conflict with it.

  • sslOptions — TLS is not yet supported for client routes connections.

Combining either with clientRoutes throws when the client is created.

Limitations¶

  • Mixed clusters are not supported. Every node must be reachable through client routes, and so must have a corresponding entry in system.client_routes. A cluster where some nodes are behind private networking and others are reachable directly will not work.

  • Advanced shard awareness (the driver picking a source port to target a specific shard) is disabled, because the proxy infrastructure does not preserve it. Basic shard awareness still works, so requests are still routed to the correct shard.

Was this page helpful?

PREVIOUS
Authentication
NEXT
Shutdown
  • Create an issue
  • Edit this page

On this page

  • Client Routes (Private Networking)
    • How it works
    • Usage
    • Proxies
    • Restrictions
    • Limitations
ScyllaDB Node.js Driver
Search Ask AI
  • v0.7.1
    • main
    • v0.7.1
    • v0.6.1
  • Getting Started
  • Statements
    • Executing CQL Statements - Best Practices
    • Unprepared Statements
    • Batch Statements
    • Parameterized queries
  • Fetching Large Result Sets
  • Schema Metadata
  • Topology
  • Replicas
  • Query Tracing
  • Logging
  • Policies
    • Load Balancing
    • Retry Policies
  • Authentication
  • Client Routes (Private Networking)
  • Shutdown
  • Migration Guide
  • API Reference
    • Modules
      • auth
        • AuthProvider
        • Authenticator
        • PlainTextAuthProvider
      • datastax
        • graph
        • search
      • errors
        • ArgumentError
        • AuthenticationError
        • BusyConnectionError
        • DriverInternalError
        • NoHostAvailableError
        • NotSupportedError
        • OperationTimedOutError
        • ResponseError
      • geometry
      • mapping
        • DefaultTableMappings
        • Mapper
        • ModelBatchItem
        • ModelMapper
        • Result
        • UnderscoreCqlToCamelCaseMappings
        • TableMappings
      • metrics
        • DefaultMetrics
        • ClientMetrics
      • policies
        • addressResolution
          • AddressTranslator
          • EC2MultiRegionTranslator
          • MappingAddressTranslator
        • loadBalancing
          • AllowListPolicy
          • DCAwareRoundRobinPolicy
          • DefaultLoadBalancingPolicy
          • LegacyDefaultLoadBalancingPolicy
          • LoadBalancingConfig
          • LoadBalancingPolicy
          • RoundRobinPolicy
          • TokenAwarePolicy
        • reconnection
          • ConstantReconnectionPolicy
          • ExponentialReconnectionPolicy
          • ReconnectionPolicy
        • retry
          • FallthroughRetryPolicy
          • RetryPolicy
        • timestampGeneration
          • MonotonicTimestampGenerator
          • TimestampGenerator
      • tracker
        • RequestLogger
        • RequestTracker
      • types
        • BigDecimal
        • Duration
        • InetAddress
        • Integer
        • LocalDate
        • ResultStream
        • Row
        • TimeUuid
        • Tuple
        • Uuid
    • Classes
      • Client
      • ColumnInfo
      • ConstantSpeculativeExecutionPolicy
      • DateRange
      • DateRangeBound
      • DseGssapiAuthProvider
      • DsePlainTextAuthProvider
      • Edge
      • Element
      • Encoder
      • EncoderMembers
      • ExecutionOptions
      • ExecutionProfile
      • FrameReader
      • FrameWriter
      • GraphResultSet
      • HashSet
      • LineString
      • NoSpeculativeExecutionPolicy
      • Path
      • Point
      • Polygon
      • PreparedInfo
      • Property
      • ResultColumnsCache
      • ResultSet
      • RustResult
      • RustSession
      • SpeculativeExecutionPolicy
      • SslOptions
      • Token
      • TokenRange
      • Vertex
      • VertexProperty
      • module-metadata-LocalStrategy
    • Interfaces
    • Events
    • Global Functions and Constants
Docs Tutorials University Contact Us About Us
© 2026 ScyllaDB | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 23 Oct 2026.
Powered by Sphinx 9.1.0 & ScyllaDB Theme 1.9.3