azure - 我们应该为每个 Web 应用程序创建一个 Azure CosmosDB 还是多个?

标签 azure azure-cosmosdb

我使用 Azure cosmos db 设置了一个 Web 应用。我发现我们对每个数据库的容器数量有限制。现在,当我们共享吞吐量时,它是 25 个容器。 这里的最佳实践是什么:

  1. 为每个应用创建多个数据库,尽管该应用不是微服务。
  2. 用户无服务器 Cosmos 数据库
  3. 将吞吐量置于容器级别。

请指教。

最佳答案

I have a container for each entity like Organizations and Users... So the containers number reaches this limit easily.

我认为你需要重新考虑你的设计。来自 the docs :

A container is a schema-agnostic container of items. Items in a container can have arbitrary schemas. For example, an item that represents a person and an item that represents an automobile can be placed in the same container. By default, all items that you add to a container are automatically indexed without requiring explicit index or schema management. You can customize the indexing behavior by configuring the indexing policy on a container.

不要陷入尝试将关系数据库架构映射到 Cosmos DB 资源模型的陷阱。不要将容器视为 table 。您读过modeling guide吗?已经了吗?

关于azure - 我们应该为每个 Web 应用程序创建一个 Azure CosmosDB 还是多个?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72811597/

相关文章:

c# - 当 "benchmarking"documentdb 时,结果截然不同

mongodb - 如何引用另一个集合中的数据?

azure - 将多个范围值传递到 Oauth token 端点

azure - Azure函数是否可以监听多个blob以进行blob触发器

Azure cspack.exe 抛出 System.Runtime.Remoting.RemotingException

部署后设备未报告 IoT Edge 上的 Azure 流分析模块

azure - 如何在 CosmosDB 上为 Cassandra 创建数据库用户?

angular - 根据文件上传百分比显示 mat-spinner

azure - DocumentDb 中文档的同一字段上的不同类型的索引

azure-functions - CosmosDBTrigger 可靠地处理每个文档一次?