From all the research I've done it seems that even when using a partition key in CosmosDB/DocumentDB you may run into an issue with capacity if that partition hits the 10gb limit. I've seen strategies where you can append a date for logging purposes or other such time-based key in order to partition by date and this makes sense however I wanted to come up with a relatively safe option for general entities in my domain as well as entities that belong to specific users or accounts. In my first pass at this I came up with this:
1. Use '_docType' as the partition key.
2. Account documents are named "Account"
3. Documents belonging to an Account are named "Account<AccountId>"
4. Documents for a specific entity type are named "<EntityName>"
5. Documents belonging to an entity are named "EntityName-<EntityId>"
6. Documents of a particular entity type belonging to a spcific account are
named "EntityName-Account-<AccountId>"
7. Documents belonging to particular entity type for a specific account are named "EntityName-<EntityId>-Account-<AccountId>"
Does this look like a good strategy that will scale well using unlimited/partitioned collections?
Is there anything missing from this strategy?
Any potential flaws or issues from this method?