0

If I write a new key/value to dynamodb, will the result differ in case of reading it in "Strong consistency" mode or "Eventual consistency" mode?

I mean it is a new key/value which is never going to get updated.

Neeraj Gupta
  • 765
  • 1
  • 10
  • 18

2 Answers2

1

If you don't need to read they key/object back right after your write it, by the same or another process, its not going to matter.

E.J. Brennan
  • 45,870
  • 7
  • 88
  • 116
  • What if I need to read it right after I write? My question is mainly whether the consistency matters for updates only? If I write and then read immediately, can eventual consistency say that the key doesn't exist? – Neeraj Gupta Sep 19 '15 at 00:47
  • Yes, it can, though the documentation states that the typical duration would be less than 1 second, so your definition of "immediately" could be significant. – Michael - sqlbot Sep 19 '15 at 04:27
1

It is possible for an eventually consistent read to still return null in this case. The documentation does say 1 sec propagation delay in general, but it is not a guarantee. If your application critically depends on reading the latest version of the item, then you will want to use strongly consistent reads.

Jeffrey Nieh
  • 336
  • 2
  • 5