GSI Replication Latency | Dynamo DB

0

Hello Everyone,

What is the maximum latency which GSI replication can experience ?
There was a scenario where the base table get operation returned the item, but GSI didn't not return the item after 3 seconds. The item was available after 5 to 10 seconds. Has anyone expirienced similar delays in the GSI replication?
PS: There was no back pressure on the table, the table was experiencing low volume of throughput.

profile picture
AGS
asked 2 months ago85 views
2 Answers
2

GSI's are eventually consistent, and unfortunately there is no upper bound to eventual in this context.

What I can say is that GSI's are consistent within a second under normal working conditions, but as DynamoDB is a large scale distributed system, then issues can arise (such as leader failover, node failure etc....).

My suggestion would be not to rely on the consistency of an eventually consistent system, if you need strong consistency, consider using an LSI. If you need strong consistency but with different partition key, you can make use of a second table and use TransactWriteItem API to maintain an index on the second table.

TLDR; Global Secondary Indexes have no upper bound on being consistent.

profile pictureAWS
EXPERT
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago
1

Hi,

To get a better understanding of the latency <> consistency compromise of DDB: see this article: https://www.alexdebrie.com/posts/dynamodb-eventual-consistency/

It points to some Github repo https://github.com/alexdebrie/dynamodb-performance-testing/tree/master/consistency-performance where final section of the README.md gives some numbers about latency for GSI consistency

Best,

Didier

profile pictureAWS
EXPERT
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago
profile picture
EXPERT
reviewed 2 months ago
  • These numbers are biased towards that users specific use-case at that time. It does not allow for transient issues such as network blips or any other sort of failure. It would be wrong to take any sort of dependency on those numbers.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions