Auto-scaling and the Python SDK

KV operations are insert, upsert, replace, get, etc. – basically anything accepting a key/documentid as a mandatory input parameter. non-KV operations mean things such as views and n1ql.

The client fetches a new configuration (which would contain information about all nodes currently in the cluster) when it encounters specific types of errors (basically, any error that isn’t a result of a data logic error: not-found, exists, etc).

Because of how couchbase’s data sharding works, all KV nodes must be part of the data sharing process - and if a new node is added, the map (indicating which vbucket belongs to which server) inherently changes, and will eventually cause an error to be sent back to the client.

Non-KV operations on the other hand are not bound to specific nodes - so all nodes performing KV operations are considered equal, and there is no ‘error’ received by the client if it sends an operation to one node and not the other.

1 Like