Consistency Tokens

Authorization is on the critical path for every application, so you need strong consistency guarantees. Oso Cloud uses Consistency Tokens to enable a read-your-writes (opens in a new tab) consistency model, ensuring that your application is reading the most up-to-date data when assessing an authorization query.

In order to achieve fast read performance and high availability, Oso Cloud replicates your data to our edge nodes. When your app performs a write, like inserting a fact, deleting a fact, or updating your policy, the write request is sent to an Oso Cloud global message queue, which forwards the request to all of the edge nodes. At the same time, your app receives a Consistency Token with information about where that request stands in the queue.

When your app then makes a read request from the server, the request is routed to one of several available nodes. The Consistency Token tells Oso to respond only after the write has been processed by the node handling your request. This guarantees read-your-writes consistency so that you know you’re getting the most up-to-date authorization decisions.

Consistency Tokens: Oso uses Consistency Tokens to enforce read-your-writes consistency to ensure that you're getting the most up-to-date authorization decisions.