@@ -535,6 +535,52 @@ datastax-java-driver {
535535 # change.
536536 # Overridable in a profile: no
537537 warn-on-init-error = true
538+
539+
540+ advanced-shard-awareness {
541+ # Whether to use advanced shard awareness when trying to open new connections.
542+ #
543+ # Requires passing shard-aware port as contact point (usually 19042 or 19142(ssl)).
544+ # Having this enabled makes sense only for ScyllaDB clusters.
545+ #
546+ # Reduces number of reconnections driver needs to fully initialize connection pool.
547+ # In short it's a feature that allows targeting particular shard when connecting to a node by using specific
548+ # local port number.
549+ # For context see https://www.scylladb.com/2021/04/27/connect-faster-to-scylla-with-a-shard-aware-port/
550+ #
551+ # If set to false the driver will not attempt to use this feature. This means connection's local port
552+ # will be random according to system rules and driver will keep opening connections until it gets right shards.
553+ # In such case non-shard aware port is recommended (by default 9042 or 9142).
554+ # If set to true the driver will attempt to use it and will log warnings each time something
555+ # makes it not possible.
556+ #
557+ # If the node for some reason does not report it's sharding info the driver
558+ # will log a warning and create connection the same way as if this feature was disabled.
559+ # If the cluster ignores the request for specific shard warning will also be logged,
560+ # although the local port will already be chosen according to advanced shard awareness rules.
561+ #
562+ # Required: yes
563+ # Modifiable at runtime: yes, the new value will be used for connections created after the
564+ # change.
565+ # Overridable in a profile: no
566+ enabled = true
567+
568+ # Inclusive lower bound of port range to use in advanced shard awareness
569+ # The driver will attempt to reserve ports for connection only within the range.
570+ # Required: yes
571+ # Modifiable at runtime: yes, the new value will be used for calls after the
572+ # change.
573+ # Overridable in a profile: no
574+ port-low = 10000
575+
576+ # Inclusive upper bound of port range to use in advanced shard awareness.
577+ # The driver will attempt to reserve ports for connection only within the range.
578+ # Required: yes
579+ # Modifiable at runtime: yes, the new value will be used for calls after the
580+ # change.
581+ # Overridable in a profile: no
582+ port-high = 65535
583+ }
538584 }
539585
540586 # Advanced options for the built-in load-balancing policies.
0 commit comments