database concurrency - Amazon DynamoDB Conditional Writes and Atomic Counters -
the application im working on requires me increment attribute belonging item in dynamodb many times in 20 30 minute period. i've been doing additional reading dynamodbs conditional writes , atomic counters
atomic counters in dynamo seems logical choice need worry consistency of data across distributed database dynamo , issues accuracy of data. i'm expecting api hammered @ peak times want avoid performance issues related conditional updates. guess want know how reliable atomic counters dynamodb , how implement them correctly using dynamo. other suggestions welcome.
yes, these features want use. using them via dynamo api way.
now, between these 2 features, use conditional write if counter need modify if critical business (you tell api update value x + 10 "if , if" existing value x)
the same document referred explains atomic counter:
"you might retry operation if suspect previous request unsuccessful. however, risk applying same update twice. might acceptable web site counter, because can tolerate over- or under-counting visitors. however, in banking application, safer use conditional update."
so if business critical operation use conditional write, otherwise atomic counter. hope clarifies.
Comments
Post a Comment