Does the "shard-aware" port need to be specified in scylla-driver?

408 views
Skip to first unread message

Robert Hayre

<robert@rtbiq.com>
unread,
Jun 18, 2021, 4:18:56 PM6/18/21
to ScyllaDB users

Scylla Experts:

There is an additional share-aware port 19042 that accepts database queries, and the Python Scylla client has both token- and shard- awareness built in.  However, I notice that with default configuration and `load_balancing_policy = TokenAwarePolicy(DCAwareRoundRobinPolicy())`, traffic is directed to port 9042, over 8 separate client ports per Scylla node.

Do I need to specify explicitly the shard-aware port in the `Cluster()` instantiation to take advantage of shard routing based on client port number, or does the router at 9042 handle that too?  If the latter, why have the shard-aware port?

Thanks for your help,
Robert

Piotr Sarna

<sarna@scylladb.com>
unread,
Jun 21, 2021, 2:17:03 AM6/21/21
to scylladb-users@googlegroups.com, Robert Hayre

Hi Robert,

yes, I believe that the default port number for Scylla's python driver is 9042, so in order to use the new way of establishing shard-aware connections based on client point numbers you should explicitly connnect to your-endpoint:19042. The original 9042 port does not balance new connections based on client point numbers, so the old shard-awareness mechanism will be used instead (creating a bunch of connections until all shards are covered, then dropping the excess ones).

--
You received this message because you are subscribed to the Google Groups "ScyllaDB users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scylladb-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scylladb-users/f863706e-505d-471b-8fd3-4e5b7f297a3fn%40googlegroups.com.

Robert Hayre

<robert@rtbiq.com>
unread,
Jun 23, 2021, 2:43:41 PM6/23/21
to ScyllaDB users
Great, thank you for confirming this.
Reply all
Reply to author
Forward
0 new messages