Strong Consistency vs Eventual Consistency Quiz Quiz

Explore the key differences between strong consistency and eventual consistency in distributed systems with this quiz designed to clarify how data accuracy and timing work across various scenarios. Sharpen your understanding of these consistency models and learn which situations best suit each approach.

  1. Definition of Strong Consistency

    Which of the following best describes strong consistency in a distributed system?

    1. Data is updated only once per hour.
    2. Users may see outdated data for a short period.
    3. All users always see the most recent data at any time.
    4. Data is randomly synchronized among servers.

    Explanation: Strong consistency ensures that every user accessing the system will always see the most recent version of the data, no matter which server they connect to. The other options are incorrect because updating data once per hour (option B) does not guarantee immediate visibility, eventual consistency (option C) allows for temporary stale reads, and random synchronization (option D) does not guarantee any predictable consistency.

  2. Eventual Consistency Behavior

    If a system uses eventual consistency, what might a user experience right after updating their profile picture?

    1. All users instantly see the new picture.
    2. Some users might see the old picture for a short time.
    3. No users can update their profile picture.
    4. The profile picture is deleted from the system.

    Explanation: Eventual consistency means changes like an updated profile picture may not be instantly visible to everyone, so some users might briefly see outdated data. Option B is incorrect because instant consistency is not guaranteed. Option C is not a characteristic of eventual consistency. Option D describes data loss, which is unrelated.

  3. Latency and Consistency Tradeoff

    Why might a distributed system choose eventual consistency over strong consistency?

    1. To reduce latency and increase system availability.
    2. To guarantee all users see updates at the same time.
    3. To introduce frequent system outages.
    4. To prevent data from ever being updated.

    Explanation: Eventual consistency helps systems provide faster responses and remain available during network partitions, which is ideal for applications where absolute up-to-the-second accuracy is not essential. Strong consistency (option B) provides accuracy but at the cost of possible latency. Options C and D are incorrect as eventual consistency does not block updates or intentionally cause failures.

  4. Consistency in a Shopping Cart Scenario

    A user adds an item to a shopping cart on one server. In a strongly consistent system, what happens when they view the cart from another device immediately afterward?

    1. The cart will always be empty.
    2. The cart may randomly display different items.
    3. The newly added item always appears instantly.
    4. The user will be logged out automatically.

    Explanation: Strong consistency ensures any changes like adding an item to a cart are immediately visible across all devices and servers. Option B is incorrect as strong consistency never causes data loss. Option C does not reflect consistency guarantees, and option D discusses user sessions, which is unrelated.

  5. Eventual Consistency Use Case

    For which application is eventual consistency most appropriate?

    1. Social media news feed updates.
    2. Password authentication systems.
    3. Real-time bank account transfers.
    4. Medical equipment monitoring.

    Explanation: Social media feeds can tolerate slight delays in updates, making eventual consistency suitable. Bank transfers (option B), authentication (option C), and medical monitoring (option D) require strong guarantees and up-to-date data, where delays or temporary inconsistencies could cause problems.

  6. Conflict Resolution in Eventual Consistency

    In eventual consistency, what is often used to handle conflicting updates from multiple sources?

    1. Rejecting all user updates.
    2. Conflict resolution mechanisms such as last-write-wins.
    3. Stopping synchronization permanently.
    4. Immediate global locking of all data.

    Explanation: Eventual consistency often relies on conflict resolution strategies like last-write-wins to manage updates that occur simultaneously. Immediate global locking (option B) is costly and not common in these systems. Option C is impractical, and option D would prevent eventual consistency from functioning.

  7. Read Your Writes Guarantee

    Which consistency model guarantees that once a user writes data, their subsequent reads always reflect that write?

    1. Strong consistency
    2. Inconsistent consistency
    3. Eventual consistency
    4. Weak randomization

    Explanation: Strong consistency ensures a 'read your writes' guarantee, meaning users always see their own updates immediately. Eventual consistency (option B) could show outdated data. Options C and D are not valid or recognized consistency models.

  8. System Partition Tolerance

    During a network partition, which consistency model typically prioritizes availability over immediate accuracy?

    1. Sequential consistency
    2. Backward consistency
    3. Strong consistency
    4. Eventual consistency

    Explanation: Eventual consistency allows the system to remain available even during network disruptions, with the guarantee that all nodes will eventually synchronize. Strong consistency (option B) may sacrifice availability for accuracy. Sequential and backward consistency (options C and D) are not commonly discussed partition strategies.

  9. Consistency Guarantees in Banking

    Why is strong consistency generally required for banking transactions?

    1. To ensure accurate account balances and prevent double spending.
    2. To intentionally duplicate money entries.
    3. To allow temporary mismatches in transaction records.
    4. To speed up money transfers by showing outdated values.

    Explanation: Banking requires absolute accuracy and integrity, which strong consistency provides, preventing issues like double spending. Slight mismatches (option B), outdated values (option C), and duplication (option D) are risky and unacceptable in financial applications.

  10. Consistency Model for Large-Scale Distribution

    What is a primary reason large-scale distributed systems often choose eventual consistency?

    1. To eliminate all data synchronization.
    2. To guarantee immediate updates everywhere.
    3. To reduce the number of servers required.
    4. To support higher scalability and network fault tolerance.

    Explanation: Eventual consistency allows systems to scale easily and continue operating smoothly despite network failures. Eliminating synchronization (option B) would result in data chaos, while option C refers to strong consistency. Reducing servers (option D) is unrelated to consistency models.