My SQL CosmosDB account is configured with Session consistency and a primary + secondary read-only region. The secondary is only used during DR failover, at which point it is promoted to the write region.
I have an application that has a cluster of instances serving API requests.
One API request can create a resource, and another can get the same resource.
These requests can happen on different application server instances, and therefore different Cosmos client sessions.
Due to the Session consistency, if a get request occurs on another instance of my application, it can sometimes not see the record that a previous put/post has created.
Looking through the documentation (https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels), it seems that the consistency levels are mostly aimed at managing expectations for other regions rather than within a single region.
What I would like is strong consistency within a region (regardless of Session), but eventual consistency for the secondary region. Is there a way to achieve what I want without having to pay the performance costs associated with Strong/Bounded Staleness (because I don’t need more than eventually consistent on the secondary)?