Can I increase the maximum key capacity by scaling horizontally

As I understand it, Couchbase stores keys in memory. So, the maximum number of keys is limited by the memory on the host server. Can I increase the maximum number of keys I can store in Couchbase by adding nodes to a cluster?

For example, Lets say I have one Couchbase instance running one server with very limited resources… Due to key size and limited memory, the database maxes out at 1 million keys.
Question. If I add 2 identically configured servers to my cluster, for a total of three server. If my key sizes are fixed, can my Couchbase cluster now max out at 3 million keys?

Can I increase the maximum key capacity by scaling horizontally?

Not sure I see the answer in any of those links.
But, thanks.

Hi Ben,
Assuming you are using Value-only Eviction (which is the default), the keys will be kept in memory. Each server will keep the keys for the vbuckets that the server stores. So yes, by horizontally scaling you are spreading the documents (and hence the keys) across more servers.
Additionally, you can always choose Full eviction as your policy if you do not have enough memory to store keys for all your data. Here is a recent blog on the subject that you might find helpful:

1 Like

Excellent answer and very helpful link. Thank you.