Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Support for configuring number of shards and replicas for a couch database #472

Closed
CodipherX opened this issue May 19, 2020 · 3 comments
Closed

Comments

@CodipherX
Copy link
Contributor

Please read these guidelines before opening an issue.

Feature Request

From the source code, I found that it is not possible to use the cloudant to configure the shards and replica count of a database.
https://docs.couchdb.org/en/stable/cluster/sharding.html

I would like something as couch_client.create_database(db_name, shards=3, replica=2, partitioned=False)

Environment details

Cloudant: 2.13
Python: 3.7

@bessbd
Copy link
Contributor

bessbd commented May 19, 2020

Hi @CodipherX ,

Thank you for this feature request!
For python-cloudant, the primary purpose is allowing developers to interact with IBM Cloudant databases.
For IBM Cloudant, setting shard count and replicas is not enabled: https://cloud.ibm.com/docs/Cloudant?topic=cloudant-how-is-data-stored-in-ibm-cloudant-#setting-shard-count

I recommend using Endpoint access if you want to control shard count and replicas.
Also, I suggest being careful adjusting those values (or not adjusting them at all) as it's easy to run into issues of fault tolerance and/or performance by setting incorrect numbers.

@CodipherX
Copy link
Contributor Author

Hi @bessbd ,

As of now, I have been using the Endpoint access. But it would be good to have this flexibility as part of create_database() function.
Please see if your team can accommodate this in the next major release.
Regards

@ricellis
Copy link
Member

Our new cloudant-python-sdk(beta) makes the q parameter available.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants