Cosmos DB in depth
Cosmos DB as a platform is much more than a simple database. The design of your data model, as well as the implementation of the data access layer, depends greatly on the feature being utilized. Partitioning and indexing setup can help improve performance, while also providing the roadmap for query strategies. Data triggers, stored procedures, and the change feed are extensibility points that allow developers to implement language-integrated transactional JavaScript blocks, which can greatly decrease the system's overall complexity and also compensate for the write transaction compromise in favor of denormalized data.
Partitioning
Cosmos makes use of two types of partitions – namely physical and logical partitions – in order to scale individual containers (that is, collections) in a database. The partition key that's defined at the time of the creation of a container defines the logical partitions. These logical partitions are then distributed...