Description

SetConsistency changes the consistency level of the client.

When consistency is set to STRONG_CONSISTENCY, all requests, including GET, are sent to the leader. This means that, assuming the absence of leader failures, GET requests are guaranteed to see the changes made by previous requests.

When consistency is set to WEAK_CONSISTENCY, other requests are still sent to the leader, but GET requests are sent to a random server from the server pool. This reduces the read load on the leader, but it's not guaranteed that the GET requests will see changes made by previous requests (they might have not yet been committed on non-leader servers).

SetConsistency is referenced in 0 repositories