Originally from the User Slack
@Nico_Piderman: Can anyone provide any guidance around using advanced shard awareness in a K8s environment, when the clients are in K8s and Scylla is not? The c++ driver complains that it is behind a NAT and disables the feature.
@Maciej_Zimnoch: I’m not 100% sure it’s true for C++ driver, but it is for others (Go, Java). I assume it’s the same in C++. Advanced shard awareness is about building connection pool in smarter way. NAT prevents it, because info about to which shard driver attempts to connect to is stored in source port. If NAT interferes, this information is lost, and random shard is assigned. Driver detects that, and disables “smart” connections and falls back to buliding pool using random shard assignment until all shards are covered.
Once pool is built, shard awareness still works, as driver is able to pick shard connections from pool.
So it’s not as bad as it sounds as it’s only about building connection pool, not about routing requests. The solution is to disable NAT, or live with it.
@Nico_Piderman: Ahhh, good point! Thank you for pointing that out