I am using Cosmos DB for my application that I am developing for a client. The client is a multi-national with around 175,000 employees worldwide. The application has to consolidate notifications from various source systems and display them on a user's portal when the user clicks the drop-down for their name same as any of the online systems, e.g., LinkedIn etc.
I am trying to determine the 'Partition Key' for Cosmos DB. I believe that this is the "User Id". I want to make sure that I have the benefit of people with more experience in Cosmos DB database design.
Here is my reasoning for selecting the User Id as Partition Key. I know that potentially there can be around 175,000 'Logical' partitions, they will be mapped to far fewer 'Physical' partitions on the underlying Azure Data Storage Platform. The choice of 'User Id' guarantees that ALL of the current User's notification records are stored on the same 'Logical' and therefore 'Physical' partition.
Am I wrong? Please confirm. If yes, then what is a better strategy?
Thanks.
Bharat