Skip to content

Commit

Permalink
Update guide and add links
Browse files Browse the repository at this point in the history
  • Loading branch information
g-despot committed Feb 6, 2025
1 parent 1003c2b commit 785e575
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
8 changes: 8 additions & 0 deletions developers/weaviate/config-refs/schema/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ The following are not allowed:
* Any map type is forbidden, unless it clearly matches one of the two supported types `phoneNumber` or `geoCoordinates`.
* Any array type is forbidden, unless it is clearly a reference-type. In this case, Weaviate needs to resolve the beacon and see what collection the resolved beacon is from, since it needs the collection name to be able to alter the schema.

### Avoid creating too many collections

Creating a separate collection for each tenant may seem like a straightforward approach to data isolation, but it can lead to scalability issues as the number of collections grows. Each collection requires its own schema, index, and storage, increasing memory usage, operational complexity, and query inefficiencies.

Instead, consider [using multi-tenancy](/developers/weaviate/manage-data/multi-tenancy), where a single collection stores data for multiple tenants with logical separation using metadata. This approach improves resource efficiency, query performance, and scalability while simplifying collection definition management.

For more details, see [Starter Guides: Scaling limits with collections](/developers/weaviate/starter-guides/managing-collections/collections-scaling-limits).

### Multiple vectors (named vectors)

import MultiVectorSupport from '/_includes/multi-vector-support.mdx';
Expand Down
6 changes: 4 additions & 2 deletions developers/weaviate/manage-data/collections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ import InitialCaps from '/_includes/schemas/initial-capitalization.md'
</TabItem>
</Tabs>

:::tip
If you are creating more than 10 collections, take a moment to consider if [multi-tenancy](/developers/weaviate/starter-guides/managing-collections/multi-tenancy-performance) might be utilized.
:::tip Avoid creating too many collections
Using too many collections can lead to scalability issues like high memory usage and degraded query performance. Instead, consider [using multi-tenancy](/developers/weaviate/manage-data/multi-tenancy), where a single collection stores data for multiple tenants.

For more details, see [Starter Guides: Scaling limits with collections](/developers/weaviate/starter-guides/managing-collections/collections-scaling-limits).
:::

## Create a collection and define properties
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
title: Do you have too many collections?
sidebar_label: Too many collections?
sidebar_label: Scaling limits with collections
sidebar_position: 1
image: og/docs/more-resources.jpg
# tags: ['performance']
---


Consider a scenario where you are developing a SaaS platform for product recommendations, allowing merchants to import and vectorize their product data. The users of this platform, let's call them merchants, require the ability to efficiently perform vector searches to generate personalized recommendations for users on their respective e-commerce platforms.

At first glance, the solution may seem straightforward - creating a dedicated collection for each merchant to store their product data. However, this approach raises critical scalability concerns. As the number of merchants grows, so does the number of collections, potentially leading to performance bottlenecks and increased operational complexity. This leads us to an important question:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,7 @@ Starting from version `v1.20.0`, each collection can be configured as a multi-te
This is useful if you want to use Weaviate as a backend for a multi-tenant (e.g. SaaS) application, or if data isolation is required for any other reason.

:::info How many collections is too many?

To learn more about the performance benefits of multi-tenancy compared to separate collections for each tenant, visit [this guide](/developers/weaviate/starter-guides/managing-collections/multi-tenancy-performance).

To learn more about the performance benefits of multi-tenancy compared to separate collections for each tenant, visit [this guide](/developers/weaviate/starter-guides/managing-collections/collections-scaling-limits).
:::

import SchemaWithMT from '/_includes/code/tutorial.schema.multi-tenancy.mdx';
Expand Down

0 comments on commit 785e575

Please sign in to comment.