Reputation: 51
When writing to azure table storage we sometimes see behavior that looks like the following situation:
We send an update request “The update is received and queued for actual processing in azure“
We receive an 200 OK result on the update request
We send a request for data
We get data from before the update (undesirable situation)
We “wait a bit”
We send another request for data
We get data from after the update
When azure is busy, the update seems to take a while, which becomes a problem if we query the updated data immediately (eventual consistency). Are the above assumed inner workings of azure correct?
If so, what are best practices for getting up to date data directly after an update?
Upvotes: 4
Views: 193
Reputation: 23782
I'm afraid that the situation is kind of normal.As we know,CAP has influenced so many data systems.Please refer to this detailed document.
The situation you described shows that azure table storage uses high availability, which guarantees that the service could be accessed by users at all times. However, this has a slight impact on consistency, and the data accessed by users may not be up-to-date.
You could know about cosmos db table-api,it supports 5 consistency levels,from Strong to Eventually.
If you do concern the real-time data,you could set the level as Strong.
Upvotes: 1