Questions tagged [eventual-consistency]

Eventual consistency is a consistency model used in distributed computing that informally guarantees that, if no new updates are made to a given data item, eventually all accesses to that item will return the last updated value.

Eventual consistency is widely deployed in distributed systems (often under the moniker of optimistic replication) and has origins in early mobile computing projects. A system that has achieved eventual consistency is often said to have converged, or achieved replica convergence. While stronger models, like linearizability are trivially eventually consistent, the converse does not hold.

Eventually consistent services are often classified as providing BASE (Basically Available, Soft state, Eventual consistency) semantics (in contrast to traditional ACID (Atomicity, Consistency, Isolation, Durability) guarantees).Eventual consistency is sometimes criticized as increasing the complexity of distributed software applications. This is partly because eventual consistency is purely a liveness guarantee (reads eventually return the same value) and does not make safety guarantees: an eventually consistent system can return any value before it converges.

Wikipedia

278 questions
4
votes
4 answers

App Engine Shard Counters and High Replication Datastore

I'm using App Engine with the eventually-consistent High Replication Data Store. I'm also using sharded counters. When I query for all of the shards and sum them up, can I assume the counts are strongly consistent? That is, will the below code…
3
votes
2 answers

Distributed database which allows custom CRDT merging

I‘m rather new to distributed databases, though I have already studied related literature (e.g. CAP theorem, CRDT) and implemented some POC to allow scaling my application horizontally. Now I however face a challenging problem. In ordere to scale…
benjist
  • 2,740
  • 3
  • 31
  • 58
3
votes
1 answer

Dealing with read eventual consistency by retrying GetItem

I building an API #1 that creates an item in DynamoDB. I'm building another API #2 that retrieves an item using GSI (input key may not exist). But GSI reads can only be eventually consistent, and I don't want the scenario where API #1 creates an…
onepiece
  • 3,279
  • 8
  • 44
  • 63
3
votes
1 answer

Optimistic concurrency control clarification

I am new to ES7 and trying to understand optimistic concurrency control. I think I understand that when I get-request a document and send its _seq_no and _primary_term values in a later write-request to the same document, if the values differ, the…
3
votes
1 answer

BigQuery eventual consistency guarantees using streaming insert API

I would like to use the BigQuery streaming insert API to insert rows into a BigQuery table. In my use case, this is the only class of "write" operation that will ever be performed; I will never insert rows by any other means, and I will never…
3
votes
1 answer

Is there a way to transport data with a 100% delivery guarantee using RabbitMQ?

I'm building a system in which I'd like to use RabbitMQ as the main message passing mechanism. My system requires very strong guarantees for message delivery, as in, messages must arrive at their destination and acknowledged, otherwise I expect…
nadavvadan
  • 3,930
  • 1
  • 17
  • 29
3
votes
0 answers

Google Datastore Strong consistency and Entity Group max size

In a shared expenses app that shows payments dues and shared expenses details for each group. As a financial application, so many operations are transactional, which requires strong consistency to ensure data integrity. We used Entity Groups and…
3
votes
3 answers

Why can't cassandra survive the loss of no nodes without data loss. with replication factor 2

Hi I was trying out different configuration using the site https://www.ecyrd.com/cassandracalculator/ But I could not understand the following results show for configuration Cluster size 3 Replication Factor 2 Write Level 1 Read Level 1 You…
3
votes
1 answer

DynamoDB PutItem then UpdateItem consistency with ReturnValues ALL_NEW

When adding a new item with PutItem and then updating it with UpdateItem which has a return values set to ALL_NEW is it expected that the return values will be strongly consistent? For example Putting an item; {key: 1a a: 1} Then updating the…
NightWolf
  • 7,694
  • 9
  • 74
  • 121
3
votes
1 answer

How does immutable data make eventual consistency trivial?

I have been reading Nathan Marz' article about how to beat the CAP theorem with the Lambda Architecture and don't understand how immutable data will make eventual consistency less complex. The following paragraph is taken from the article: The key…
3
votes
2 answers

Eventual Consistency in microservice-based architecture temporarily limits functionality

I'll illustrate my question with Twitter. For example, Twitter has microservice-based architecture which means that different processes are in different servers and have different databases. A new tweet appears, server A stored in its own database…
3
votes
1 answer

Querying embedded entities in Cloud Datastore

I have a couple of questions about the use of embedded entities in Datastore. Consider the following simple test case: Entity entity = new Entity("Person"); entity.setProperty("name", "Alice"); EmbeddedEntity address = new…
3
votes
2 answers

Is the data system for ATM-machines using eventual consistency?

I wounder how the world-wide ATM-systems are architected. It must be pretty hard for the banks to design a consistent system world wide. Do they use eventual consistency for this or do they use a great ACID system? I can be in Sweden one day, where…
Jonas
  • 121,568
  • 97
  • 310
  • 388
3
votes
1 answer

Sequential and Causal Consistency

For a unique item sales database, if we use sequential consistency, we can guarantee that for example that unique item never gets double sold to different people. Does causal consistency guarantee us that? If there are some sales which…
3
votes
3 answers

How to reserve a unique value in an eventual consistency environment?

Does anyone have any links/resources on how to do unique value reservations in an eventually consistent environment? Example: Users, on signup, get to choose their username. Even if two users are trying to grab the same name at the same time, only…
Nelz
  • 103
  • 4