Skip to content

DynamoDB: Use eventually consistent reads for older data #699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
leth opened this issue Feb 12, 2018 · 3 comments
Closed

DynamoDB: Use eventually consistent reads for older data #699

leth opened this issue Feb 12, 2018 · 3 comments

Comments

@leth
Copy link
Contributor

leth commented Feb 12, 2018

Eventually consistent reads cost half the throuput units of strongly consistent reads.

The data is eventually consistent across all storage locations, usually within one second or less.

We should be able to safely use eventually consistent reads for data that is sufficiently old!

@bboreham
Copy link
Contributor

When chunks are flushed from an ingester they are immediately removed from the ingester's in-memory store. So "sufficiently old" would be a few seconds after the chunk was flushed. Unfortunately there is no way to know from the querying side when a chunk will be flushed, so you'd have to guess at something like 24 hours, being well past the max chunk age plus time a chunk should live in the flush queue.

On the other hand, if we made the ingester hold the chunk in memory for while after flushing we could use eventual consistency for all DynamoDB reads.

@bboreham
Copy link
Contributor

bboreham commented Mar 3, 2018

Interestingly, we only set ConsistentRead on Get calls, not on queries.
And since we do the query first, my arguments about timing are void.

@tomwilkie you added this in #418; do you recall the thinking behind these choices?

@bboreham
Copy link
Contributor

Also recently-flushed chunks will be in memcached. (Modulo #611)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants