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 API Reference Modules policies addressResolution AddressTranslator

AddressTranslator¶

policies/addressResolution~AddressTranslator()

WARNING: Currently only the MappingAddressTranslator is supported by our driver. Using any other address translator, including custom implementations, will result in an error.

Translates IP addresses received from Cassandra nodes into locally queryable addresses.

The driver auto-detects new Cassandra nodes added to the cluster through server side pushed notifications and through checking the system tables. For each node, the address received will correspond to the address set as rpc_address in the node yaml file. In most case, this is the correct address to use by the driver and that is what is used by default. However, sometimes the addresses received through this mechanism will either not be reachable directly by the driver or should not be the preferred address to use to reach the node (for instance, the rpc_address set on Cassandra nodes might be a private IP, but some clients may have to use a public IP, or pass by a router to reach that node). This interface allows to deal with such cases, by allowing to translate an address as sent by a Cassandra node to another address to be used by the driver for connection.

Please note that the contact points addresses provided while creating the Client instance are not "translated", only IP address retrieve from or sent by Cassandra nodes to the driver are.

Constructor¶

new AddressTranslator()

Source

policies/address-resolution.js, line 33

Methods¶

translate(address, port, callback)

Translates a Cassandra rpc_address to another address if necessary.

Parameters:
Name Type Description
address String

the address of a node as returned by Cassandra.

Note that if the rpc_address of a node has been configured to 0.0.0.0 server side, then the provided address will be the node listen_address, not 0.0.0.0.

port Number

The port number, as specified in the protocolOptions at Client instance creation (9042 by default).

callback function

Callback to invoke with endpoint as first parameter. The endpoint is an string composed of the IP address and the port number in the format ipAddress:port.

Source

policies/address-resolution.js, line 46

Was this page helpful?

PREVIOUS
addressResolution
NEXT
EC2MultiRegionTranslator
  • Create an issue
  • Edit this page

On this page

  • AddressTranslator
    • Constructor
    • Methods
ScyllaDB Node.js Driver
Search Ask AI
  • main
    • main
  • API Reference
    • Modules
      • auth
        • AuthProvider
        • Authenticator
        • PlainTextAuthProvider
      • concurrent
      • datastax
      • errors
        • ArgumentError
        • AuthenticationError
        • BusyConnectionError
        • DriverInternalError
        • NoHostAvailableError
        • NotSupportedError
        • OperationTimedOutError
        • ResponseError
      • geometry
      • mapping
        • DefaultTableMappings
        • Mapper
        • ModelBatchItem
        • ModelMapper
        • Result
        • UnderscoreCqlToCamelCaseMappings
        • TableMappings
      • metadata
        • Aggregate
        • ClientState
        • ColumnMetadata
        • Index
        • KeyspaceMetadata
        • MaterializedView
        • Metadata
        • SchemaFunction
        • Strategy
        • TableMetadata
        • UdtField
        • UserDefinedType
      • metrics
        • DefaultMetrics
        • ClientMetrics
      • policies
        • addressResolution
          • AddressTranslator
          • EC2MultiRegionTranslator
          • MappingAddressTranslator
        • loadBalancing
          • AllowListPolicy
          • DCAwareRoundRobinPolicy
          • DefaultLoadBalancingPolicy
          • LegacyDefaultLoadBalancingPolicy
          • LoadBalancingConfig
          • LoadBalancingPolicy
          • RoundRobinPolicy
          • TokenAwarePolicy
        • reconnection
          • ConstantReconnectionPolicy
          • ExponentialReconnectionPolicy
          • ReconnectionPolicy
        • retry
          • FallthroughRetryPolicy
          • RetryPolicy
        • speculativeExecution
          • ConstantSpeculativeExecutionPolicy
          • NoSpeculativeExecutionPolicy
          • SpeculativeExecutionPolicy
        • timestampGeneration
          • MonotonicTimestampGenerator
          • TimestampGenerator
      • tracker
        • RequestLogger
        • RequestTracker
      • types
        • Duration
        • InetAddress
        • Integer
        • LocalDate
        • Long
        • ResultSet
        • ResultStream
        • Row
        • TimeUuid
        • Vector
    • Classes
      • AddressResolver
      • ByteOrderedToken
      • Client
      • Encoder
      • EncoderMembers
      • ExecutionOptions
      • ExecutionProfile
      • FrameReader
      • HashSet
      • Host
      • HostMap
      • LineString
      • Murmur3Token
      • Point
      • Polygon
      • PreparedInfo
      • RandomToken
      • SslOptions
      • Token
      • TokenRange
    • 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 14 May 2026.
Powered by Sphinx 9.1.0 & ScyllaDB Theme 1.9.2