Skip to main content
Go to documentation:
⌘U
Weaviate Database

Develop AI applications using Weaviate's APIs and tools

Deploy

Deploy, configure, and maintain Weaviate Database

Weaviate Agents

Build and deploy intelligent agents with Weaviate

Weaviate Cloud

Manage and scale Weaviate in the cloud

Additional resources

Academy
Integrations
Contributor guide
Events & Workshops

Need help?

Weaviate LogoAsk AI Assistant⌘K
Community Forum

Multi-node setup

Replication settings

Replication factor change

The replication factor of a collection cannot be updated by updating the collection's definition.

From v1.32 by using replica movement, the replication factor of a shard can be changed.

Configure replication settings, such as async replication and deletion resolution strategy.

from weaviate.classes.config import Configure, ReplicationDeletionStrategy

client.collections.create(
"Article",
replication_config=Configure.replication(
factor=3,
async_enabled=True, # Enable asynchronous repair
deletion_strategy=ReplicationDeletionStrategy.TIME_BASED_RESOLUTION, # Added in v1.28; Set the deletion conflict resolution strategy
),
)

Additional information

To use replication factors greater than one, use a multi-node deployment.

For details on the configuration parameters, see the following:

Sharding settings

Configure sharding per collection.

from weaviate.classes.config import Configure

client.collections.create(
"Article",
sharding_config=Configure.sharding(
virtual_per_physical=128,
desired_count=1,
desired_virtual_count=128,
),
)

Additional information

For details on the configuration parameters, see the following:

Inspect shards (for a collection)

An index itself can be comprised of multiple shards.

articles = client.collections.get("Article")

article_shards = articles.config.get_shards()
print(article_shards)

Update shard status

You can manually update a shard to change it's status. For example, update the shard status from READONLY to READY after you make other changes.

articles = client.collections.get("Article")

article_shards = articles.config.update_shards(
status="READY",
shard_names=shard_names, # The names (List[str]) of the shard to update (or a shard name)
)

print(article_shards)

Further resources

Questions and feedback

If you have any questions or feedback, let us know in the user forum.