Draft: fix: azure comsos DB redesign

Closed Diego Molteni requested to merge slb/dm3/cosmos-db-design into master

The existing design of cosmos DB could not meet the required performances. All datasets that belong to the same subproject are stored with/under the same physical partition key. A physical partition set a limit of 10k RU/s (cannot be modified). To enable cosmos horizontal scaling and higher RU/s the DB has been redesigned so every entity (tenant/subproject/dataset/app) will have its own partition key. This will allow cosmos to spread entities across multiple phgisical partition

  • tenant -> tn-<tenant_namme> (1 per partition)
  • subproject -> sp-<subproject_name> (subproject belong to a tenant )
  • dataset -> ds-<subprpoject_name>-<dataset_path>-<dataset_name> (datasets belong to a subproject... the subproject name is required)
  • app -> app-<app_name> (apps belong to a tenant)

ref: https://docs.microsoft.com/en-us/azure/cosmos-db/partitioning-overview#choose-partitionkey

in addition, an issue has been fixed on how global tags are parsed from input requests.

Merge request reports