my first instinct was to think that I must fundamentally misunderstand something about CosmosDB on Azure but I don’t know what that would be in this case. How can I possibly go beyond the autoscale 1000RU/s of this account on 40 RU when my partition keys are set to random values (=partition key is by user id which is a guid)?
The usual explanation I find online is that RU are split by partition but this also makes no sense: I don’t have any control over physical partitions and an arbitrary amount of logical partitions should be supported and if I understand correctly, the RU are shared across all logical partitions anyway even if they weren’t shared across physical partitions but I only have one so that can’t be the problem either.
As you can see, there are plenty of other times when I even consume more total request units on this chart and it didn’t cause a 100% spike. My only other explanation attempt would be that even though my autoscaling is supposed to handle 1000RU/s, it was actually at the 10% so 100RU/s and needed to ramp up first. But this is all invisible and pure theory and on top of that, I was below 100RU/s too so that souldn’t be an issue either.
For the future I’m set up the PartitionKeyRUConsumption to log into an analytics workbook but I don’t see how that will help me because it shouldn’t possibly be an issue around partition keys unless I completely misunderstand something.