What is eventual consistency?

Eventual consistency is a consistency model where updates made to data in one part of a distributed system will propagate to all other parts over time, rather than instantly and atomically.

Key Points

Example

When a user updates their shipping address in the User Service, the Order Service might still show the old address for a few seconds until it processes the "AddressUpdated" event and updates its own local copy of the customer's data.

// User service updates its own data and publishes an event
@Transactional
public void changeAddress(Long userId, Address address) {
    userRepository.updateAddress(userId, address);
    events.publish(new AddressUpdated(userId, address));   // via outbox or Kafka
}

// Order service keeps its own copy; it is updated a moment later
@KafkaListener(topics = "user-events", groupId = "order-service")
public void onAddressUpdated(AddressUpdated event) {
    customerCopyRepository.updateAddress(event.userId(), event.address());
}
// Between the two steps, the Order service briefly shows the old address.
// That short window is what "eventually consistent" means.

Interview Tip

A concise interview answer is

Eventual consistency means that after an update, the system guarantees all replicas or services will converge to the same value eventually, but not necessarily instantly. In microservices this is typically implemented through asynchronous events, and it's a deliberate trade-off for better availability and scalability compared to strict, immediate consistency.

Last updated: 1 November 2026

Previous question: How do you handle data consistency in microservices?

Next question: How would you implement a transaction that spans multiple services?

More Microservices - Level I interview questions

All Microservices - Level I questions