Home / Companies / ScyllaDB / Blog / Post Details
Content Deep Dive

Connect Faster to ScyllaDB with a Shard-Aware Port

Blog post from ScyllaDB

Post Details
Company
Date Published
Author
Piotr Dulikowski
Word Count
1,774
Language
English
Hacker News Points
-
Summary

ScyllaDB has introduced a shard-aware port to enhance the connection efficiency to its database nodes, supplementing the traditional port by default. This new port, set at 19042 by default, allows drivers to directly connect to specific shards, significantly reducing the number of connection attempts needed, particularly when multiple clients connect simultaneously. The shard-aware port overcomes limitations associated with the older connection method, where drivers could not specify which shard should handle the connection, leading to uneven distribution and increased latency. By using an algorithm based on the connection's source port modulo the number of shards, the shard-aware port streamlines the process, ensuring more consistent and efficient connections. Experimental tests demonstrated that using a shard-aware port significantly reduces the number of connection attempts, thus optimizing performance. However, some limitations exist, such as potential network configuration issues and challenges with client-side NAT, which could necessitate fallback to the non-shard-aware port. The feature is currently supported by some ScyllaDB drivers, with plans to expand support to others in the future.