FreeExam

Replication, consistency, and recovery

Original distributed systems interview scenarios on observable guarantees, replication, retries, ownership, recovery, and diagnosing failures from evidence.

These prompts are original practice. They are not questions from a named employer or a live hiring loop.

  1. 1.A catalog promises linearizable reads of each item. A price update completes before another client starts reading that item. Which result is permitted, assuming no later write?

    Show answer and explanation
    1. The updated price
    2. A random price from the last hour
    3. The previous price from any replica
    4. Either price until a scheduled repair

    Answer: The updated price

    Linearizability respects completed operations in real time. Without a later write, a subsequent read cannot return the older item value.

  2. 2.Two clients concurrently replace the same linearizable register. Neither finishes before the other starts. What must the implementation provide?

    Show answer and explanation
    1. Both values must remain independently current
    2. Every replica must receive both requests together
    3. The client with the earlier wall clock must win
    4. One ordering consistent with both responses

    Answer: One ordering consistent with both responses

    Overlapping operations may be ordered either way, but the observed responses must fit a legal single-register history.

  3. 3.A user edits a profile through the primary and immediately reads from a lagging replica. Which design supports read-your-writes without sending every read to the primary?

    Show answer and explanation
    1. Randomly choose a different replica
    2. Shorten the browser's cache lifetime
    3. Wait until the replica reaches the session's write position
    4. Return the replica result with a fresh timestamp

    Answer: Wait until the replica reaches the session's write position

    A session can carry a minimum observed log position. The serving replica must reach it or route the request to a suitable node.

  4. 4.A store guarantees linearizable operations separately on each key. An engineer claims that reading two keys automatically gives an atomic snapshot. What is missing?

    Show answer and explanation
    1. A larger checksum for each key
    2. A guarantee spanning the two-key read
    3. An additional replica in another rack
    4. An increasing timestamp on the response

    Answer: A guarantee spanning the two-key read

    Per-key ordering does not by itself coordinate a multi-key snapshot. The application needs an appropriate transaction or snapshot facility.

  5. 5.Two transactions each see one of two workers on duty, then independently mark their own worker off duty. Both commit under snapshot isolation. What prevents this invariant violation?

    Show answer and explanation
    1. Increase the replica read timeout
    2. Serialize the shared duty constraint
    3. Compress the transaction log
    4. Add an index to each worker name

    Answer: Serialize the shared duty constraint

    The transactions modify different rows but jointly violate a constraint. Serializable enforcement or explicit coordination of that constraint is needed.

  6. 6.A crash-tolerant replicated log has seven voting members and requires a strict majority for commitment. How many votes are needed?

    Show answer and explanation
    1. 5
    2. 7
    3. 3
    4. 4

    Answer: 4

    A strict majority is floor(7/2) + 1 = 4. Three members alone cannot form that quorum.

  7. 7.A fixed five-replica register uses reads from three replicas and writes to three replicas. What does quorum intersection establish by itself?

    Show answer and explanation
    1. Every read set overlaps every write set
    2. Concurrent writes cannot occur
    3. Every replica has the latest value
    4. Every read is automatically linearizable

    Answer: Every read set overlaps every write set

    Since 3 + 3 exceeds 5, the sets overlap. Version rules, concurrent operations, and the read protocol still determine consistency.

  8. 8.A team wants to replace all voters at once, allowing either old or new majorities to approve writes during transition. What is the central risk?

    Show answer and explanation
    1. The new group must have fewer members
    2. The two deciding groups may be disjoint
    3. Read latency must exceed write latency
    4. The log will necessarily become compressed

    Answer: The two deciding groups may be disjoint

    Disjoint decision groups can accept incompatible histories. Membership changes need a protocol that preserves the required quorum relationships.

  9. 9.A log replica acknowledges a write after copying it into a volatile buffer. What does that acknowledgment fail to demonstrate?

    Show answer and explanation
    1. That the replica allocated some memory
    2. That the request reached the replica
    3. That the request had a valid network checksum
    4. That the write survives its process or machine crash

    Answer: That the write survives its process or machine crash

    Receiving bytes in memory is not durable storage. An acknowledgment must match the advertised persistence boundary.

  10. 10.A consensus voter forgets its recorded vote when it restarts during the same election term. What safety concern follows?

    Show answer and explanation
    1. Its disk checksum changes the quorum size
    2. It could vote for a second candidate in that term
    3. It must reject all future log entries
    4. Its network address becomes invalid

    Answer: It could vote for a second candidate in that term

    If the protocol relies on one vote per voter per term, that voting state must survive a crash before the voter acknowledges it.

  11. 11.An old storage worker resumes after losing ownership. The new worker already has a higher fencing token. Where must the old worker's write be rejected?

    Show answer and explanation
    1. At a client that has already disconnected
    2. Only in the new worker's local memory
    3. At the resource that applies the write
    4. Only in the ownership dashboard

    Answer: At the resource that applies the write

    Ownership checks in a coordinator do not stop a paused worker's later side effect. The protected resource must enforce fencing order.

  12. 12.A service uses time-limited leases to prevent concurrent writers. Which assumption must its safety argument address?

    Show answer and explanation
    1. Whether all nodes report healthy at lease creation
    2. Clock behavior and the timing bounds of lease use
    3. Whether every request has a unique identifier
    4. Whether the replicas have equal disk capacity

    Answer: Clock behavior and the timing bounds of lease use

    Lease safety depends on explicit clock and timing assumptions. Unbounded pauses or clock error cannot be dismissed as mere monitoring issues.

  13. 13.A request has a local 200 ms execution budget. Which clock is appropriate for measuring elapsed time inside the process?

    Show answer and explanation
    1. A monotonic clock
    2. The timestamp of the latest backup
    3. The client's calendar timestamp
    4. A manually adjusted wall clock

    Answer: A monotonic clock

    A monotonic clock measures elapsed duration without wall-clock corrections moving the apparent deadline backward or forward.

  14. 14.A replica does not answer within 80 ms. What can the caller conclude solely from that timeout?

    Show answer and explanation
    1. The caller did not receive an answer in time
    2. The replica discarded the request
    3. The request's side effect did not occur
    4. The replica has permanently crashed

    Answer: The caller did not receive an answer in time

    A timeout does not distinguish slow processing, message loss, a lost reply, or a failed node. The operation may already have taken effect.

  15. 15.An inventory reservation times out after the server commits it. What client behavior avoids creating a second reservation on retry?

    Show answer and explanation
    1. Change the item count on each retry
    2. Generate a new reservation identifier
    3. Retry against every replica independently
    4. Reuse the same operation identifier

    Answer: Reuse the same operation identifier

    A stable operation identity lets the service recognize a repeated request and return its prior result rather than apply another reservation.

  16. 16.A payment simulator writes its result and deduplication record in separate transactions. A crash can occur between them. What closes the duplicate-effect gap?

    Show answer and explanation
    1. Commit both records atomically
    2. Keep the deduplication record in a client cache
    3. Increase the response body size
    4. Retry only during quiet periods

    Answer: Commit both records atomically

    The effect and evidence that it happened must share an atomic boundary, or recovery can reapply a committed effect lacking its deduplication record.

  17. 17.Two requests use the same idempotency key but specify different delivery addresses. What should the service do?

    Show answer and explanation
    1. Apply both requests in arrival order
    2. Reject the conflicting reuse
    3. Choose the shorter address
    4. Silently return the second address

    Answer: Reject the conflicting reuse

    Bind a key to the original request meaning. Conflicting payloads must not silently become one operation or apply an unintended update.

  18. 18.A service keeps idempotency records for one day, while clients may retry requests for three days. What must be resolved?

    Show answer and explanation
    1. The service needs a shorter network timeout
    2. The retry horizon exceeds duplicate protection
    3. The response should contain fewer fields
    4. The request identifier has too many characters

    Answer: The retry horizon exceeds duplicate protection

    A late retry after record expiry can look new. Align retention and retry contracts or use another durable mechanism for recognizing old operations.

  19. 19.An order database commits an order, but the process crashes before publishing its notification event. Which pattern records publishable work within the order transaction?

    Show answer and explanation
    1. A transactional outbox
    2. A larger message timeout
    3. A second independent write after commit
    4. An in-memory timer

    Answer: A transactional outbox

    The outbox stores the event alongside the business change. A separate publisher can retry delivery without losing the committed notification intent.

  20. 20.A consumer updates a local balance and then stores its processed-event marker separately. How can it prevent redelivery from changing the balance twice?

    Show answer and explanation
    1. Acknowledge before opening the database
    2. Delete the event before changing the balance
    3. Commit the balance change and marker together
    4. Track only the consumer's process uptime

    Answer: Commit the balance change and marker together

    Atomic effect and deduplication state let redelivery be recognized. A crash between separate writes otherwise leaves an ambiguous result.

  21. 21.A worker sends a notification through an external service, then crashes before recording success. Why is a local transaction alone insufficient?

    Show answer and explanation
    1. It requires the message body to be binary
    2. It cannot survive any process restart
    3. It cannot store a notification identifier
    4. It cannot atomically include the external send

    Answer: It cannot atomically include the external send

    The external service is outside the local atomic boundary. Use its idempotency support, a reconciliation protocol, or an explicitly weaker delivery contract.

  22. 22.A stream preserves order within each partition. Two changes to one account are sent to different partitions. What has the producer failed to preserve?

    Show answer and explanation
    1. The total number of available consumers
    2. The checksums of unrelated accounts
    3. The maximum payload size
    4. The account's required ordering domain

    Answer: The account's required ordering domain

    If related changes require ordered handling, their routing and sequence rules must keep them within a suitable ordering domain or explicitly coordinate them.

  23. 23.A projector receives account event 18 after event 16, and the contract requires every transition. What should it do before advancing the account projection?

    Show answer and explanation
    1. Resolve or buffer the missing event 17
    2. Assume event 17 contained no change
    3. Discard the account's entire history
    4. Rename event 18 to event 17

    Answer: Resolve or buffer the missing event 17

    A sequence gap indicates missing evidence, not an empty operation. Recovery must preserve the projection's ordering and completeness requirements.

  24. 24.One malformed event repeatedly crashes a partition consumer. Which response protects progress while preserving evidence?

    Show answer and explanation
    1. Quarantine it through an explicit recovery policy
    2. Delete every event in the partition
    3. Commit all later events as successfully processed
    4. Increase retries without any limit

    Answer: Quarantine it through an explicit recovery policy

    Quarantine and alerting preserve the failed item for investigation. The ordering contract determines whether and how later work may proceed.

  25. 25.A dead-letter event is repaired and replayed after its original delivery may have partially succeeded. What property is still needed?

    Show answer and explanation
    1. A different color in the monitoring chart
    2. A shorter event timestamp
    3. Duplicate-safe handling of its effects
    4. Removal of every prior audit record

    Answer: Duplicate-safe handling of its effects

    Replaying repaired data does not establish that earlier effects were absent. The replay path still needs deduplication, reconciliation, or compensating logic.

  26. 26.A consumer handles 700 events per second while producers sustain 1,100. What does an unbounded queue accomplish?

    Show answer and explanation
    1. It guarantees no eventual overload
    2. It raises sustainable consumer capacity to 1,100
    3. It accumulates delay and resource usage
    4. It makes producer retries unnecessary

    Answer: It accumulates delay and resource usage

    The backlog grows by roughly 400 events per second while those rates persist. Backpressure, admission control, or capacity changes must address the imbalance.

  27. 27.A shard's working memory is exhausted by accepted requests waiting on disk. What control directly limits this pressure?

    Show answer and explanation
    1. Bound admitted concurrent work
    2. Accept requests before checking capacity
    3. Increase every caller's retry count
    4. Raise the request body limit

    Answer: Bound admitted concurrent work

    Admission limits keep waiting work within resource budgets. More retries or larger requests can worsen an already saturated shard.

  28. 28.Thousands of clients retry exactly one second after a shared failure. What reduces synchronized recovery bursts?

    Show answer and explanation
    1. Remove the maximum retry limit
    2. Randomize delay within the retry policy
    3. Give every client the same longer delay
    4. Restart all clients at the same instant

    Answer: Randomize delay within the retry policy

    Jitter spreads retries over time. Backoff and retry limits still need to respect the service's recovery capacity and the caller's deadline.

  29. 29.An incoming request has 120 ms remaining. Its downstream call is configured to wait 500 ms. What should the caller propagate?

    Show answer and explanation
    1. The original request's creation date only
    2. The downstream service's longest observed duration
    3. A new unlimited execution budget
    4. A deadline bounded by the remaining budget

    Answer: A deadline bounded by the remaining budget

    Downstream work should fit the remaining useful lifetime of the request, including any budget needed to return or clean up.

  30. 30.A team duplicates slow reads to improve tail latency. Which condition is important before enabling hedging?

    Show answer and explanation
    1. The overloaded dependency must receive all duplicates
    2. The operation performs an unguarded debit
    3. The first request must always be canceled before sending another
    4. The operation tolerates duplicates and spare capacity exists

    Answer: The operation tolerates duplicates and spare capacity exists

    Hedging can reduce slow-read latency but increases work. It is unsuitable for unprotected side effects and can amplify overload without limits.

  31. 31.A dependency has been blocked by an open circuit breaker. How should recovery be tested?

    Show answer and explanation
    1. Permit a bounded number of trial requests
    2. Reset the failure counter before sending any probe
    3. Release the full backlog when one probe succeeds
    4. Keep using the most recent cached success status

    Answer: Permit a bounded number of trial requests

    Limited probes test current behavior without immediately recreating the original load spike. Recovery policy should consider both errors and capacity.

  32. 32.A slow export endpoint consumes all database connections and blocks interactive requests. Which isolation most directly contains the problem?

    Show answer and explanation
    1. Let connection requests wait without a deadline
    2. Use one larger queue shared by both workloads
    3. Raise the export concurrency to drain it faster
    4. Separate bounded connection budgets by workload

    Answer: Separate bounded connection budgets by workload

    Resource isolation prevents one workload from consuming all capacity needed by another. The limits must still fit the database's total budget.

  33. 33.A service is overloaded and cannot complete all admitted work before deadlines. Which rejection strategy is most defensible?

    Show answer and explanation
    1. Accept everything and let memory decide the outcome
    2. Disable request accounting until load falls
    3. Hide all failures behind successful status codes
    4. Reject low-priority work early with a clear retry contract

    Answer: Reject low-priority work early with a clear retry contract

    Early, intentional rejection protects useful capacity and makes caller behavior predictable. Silent success and uncontrolled queues hide loss rather than handle it.

  34. 34.A dependency's mean latency stays flat while its 99th percentile doubles. Which conclusion is justified?

    Show answer and explanation
    1. All requests now take twice their earlier duration
    2. Slow requests worsened despite the stable mean
    3. The stable mean rules out a user-visible slowdown
    4. The percentile change identifies packet loss as the cause

    Answer: Slow requests worsened despite the stable mean

    An unchanged average can conceal a deteriorating tail. Inspect distributions, sample counts, and affected request paths before assigning a cause.

  35. 35.A request makes ten independent parallel calls. Each has a 0.98 probability of finishing within the deadline. What is the probability all ten finish in time?

    Show answer and explanation
    1. Exactly 0.98
    2. Exactly 0.20
    3. About 0.817
    4. About 0.998

    Answer: About 0.817

    Under the stated independence assumption, multiply the probabilities: 0.98^10 is about 0.817. Shared failures would invalidate that simple model.

  36. 36.A stable service completes 240 jobs per second and averages 60 jobs waiting in its queue. What is the mean queue wait under Little's law?

    Show answer and explanation
    1. 4 seconds
    2. 0.25 seconds
    3. 60 seconds
    4. 14,400 seconds

    Answer: 0.25 seconds

    For the queue alone, Lq = arrival rate × Wq. With stable throughput, Wq = 60/240 = 0.25 seconds; processing time is separate.

  37. 37.Two disconnected sites must both accept conflicting updates to the same single-valued register. What must a design that keeps serving both sides explain?

    Show answer and explanation
    1. How TCP prevents all conflicting updates
    2. How it relaxes consistency and reconciles conflicts
    3. Why the last network packet is always authoritative
    4. Why two independent writers constitute one quorum

    Answer: How it relaxes consistency and reconciles conflicts

    Serving incompatible writes in both partitions cannot also preserve a linearizable single-register history. State the availability and reconciliation contract explicitly.

  38. 38.A replication algorithm assumes nodes can crash but never fabricate protocol messages. What changes if a node can lie about its stored log?

    Show answer and explanation
    1. The failure model and safety argument must change
    2. Adding one cache automatically restores correctness
    3. A shorter election timeout proves safety
    4. The node becomes equivalent to a slow follower

    Answer: The failure model and safety argument must change

    Crash-fault reasoning does not cover arbitrary malicious or corrupted behavior. Detecting or tolerating such behavior needs additional assumptions and mechanisms.

  39. 39.A snapshot contains applied state through log position 900. Where should replay begin, assuming the snapshot is valid and position 900 is included?

    Show answer and explanation
    1. At the newest entry regardless of gaps
    2. At the first required entry after 900
    3. At a position chosen from the file's modification time
    4. At 900 without any duplicate safeguards

    Answer: At the first required entry after 900

    The snapshot already represents its included prefix. Replay must continue from the next needed entry without skipping required transitions or double-applying them.

  40. 40.A backup copies related tables at different moments while writes continue. What property is missing for a coherent restore?

    Show answer and explanation
    1. A consistent recovery point across the data
    2. Identical row counts in the copied tables
    3. The latest file modification time from any replica
    4. The same compression setting for every table

    Answer: A consistent recovery point across the data

    Files from unrelated moments can violate cross-table invariants. Use a coordinated snapshot or a documented log-based procedure that reconstructs a consistent state.

  41. 41.A database may flush a modified data page before the corresponding recovery log is durable. What recovery problem can result?

    Show answer and explanation
    1. The log must become larger than the database
    2. The page's key automatically changes
    3. The page change lacks the log needed to explain it
    4. Every transaction becomes read-only

    Answer: The page change lacks the log needed to explain it

    Write-ahead ordering ensures recovery has the durable record needed before changed pages reach persistent storage. Reversing that order can undermine crash recovery.

  42. 42.A replica finds a checksum mismatch in a stored segment. What should the system avoid doing automatically?

    Show answer and explanation
    1. Replicating the unverified bytes as authoritative
    2. Compare against independently verified healthy copies
    3. Record the segment and preserve the failed bytes
    4. Quarantine the segment pending a documented repair

    Answer: Replicating the unverified bytes as authoritative

    Replication can spread corruption if a damaged copy is treated as truth. Verify independent evidence before repairing or replacing healthy data.

  43. 43.A process crashes while replacing a metadata file. Readers may see half of the new file. What property should the replacement protocol provide?

    Show answer and explanation
    1. A longer human-readable filename
    2. A larger process heap
    3. An atomic, recoverable switch between complete versions
    4. A different field order in the JSON

    Answer: An atomic, recoverable switch between complete versions

    Readers need a complete old or new version, with persistence steps matching the crash model. File naming or extra memory does not provide atomic replacement.

  44. 44.A benchmark calls a write complete when the operating system accepts its bytes. Production requires survival of machine power loss. What is wrong with the comparison?

    Show answer and explanation
    1. The results differ only because production has more replicas
    2. The benchmark uses a weaker durability boundary
    3. The benchmark should use a larger request batch only
    4. Production should acknowledge before persistence to match it

    Answer: The benchmark uses a weaker durability boundary

    A buffered acknowledgment and a durable acknowledgment measure different contracts. Compare latency only after aligning persistence and failure assumptions.

  45. 45.Three replicas sit on different virtual machines backed by one physical storage failure domain. What weakness remains?

    Show answer and explanation
    1. One shared failure can affect all copies
    2. A majority necessarily requires four votes
    3. Virtual machines cannot retain any state
    4. The replicas cannot exchange messages

    Answer: One shared failure can affect all copies

    Replica count alone does not establish independent protection. Map shared power, storage, network, and administrative failure domains.

  46. 46.A remote asynchronous replica is 35 seconds behind when the primary site is lost. What does its recovery point imply?

    Show answer and explanation
    1. No acknowledged change can be lost
    2. Recovery must finish in exactly 35 seconds
    3. Every older backup is unusable
    4. Up to that lag's committed changes may be missing

    Answer: Up to that lag's committed changes may be missing

    Replication lag bounds the exposed recent history only under the stated observations. It describes potential data loss, not the duration of service recovery.

  47. 47.A system restores 600 GB at a sustained 100 MB/s, using decimal units. What is the transfer time before validation and restart work?

    Show answer and explanation
    1. 60,000 seconds
    2. 60 seconds
    3. 600 seconds
    4. 6,000 seconds

    Answer: 6,000 seconds

    600 GB is 600,000 MB. Dividing by 100 MB/s gives 6,000 seconds, about 100 minutes, excluding other recovery steps.

  48. 48.A restored coordinator starts with ownership counters older than those used by surviving workers. What must recovery establish?

    Show answer and explanation
    1. Restart workers using their previous ownership tokens
    2. Restore counters exactly and assume surviving workers notice
    3. Allow the old and restored coordinators to issue equal tokens
    4. An ownership epoch that cannot revive stale authority

    Answer: An ownership epoch that cannot revive stale authority

    Restoring data must not make old authority valid again. Coordinate fencing epochs and external state before allowing restored workers to act.

  49. 49.A restored backup contains accounts deleted after the backup was taken. What additional recovery input may be required?

    Show answer and explanation
    1. Authoritative deletion records since the backup point
    2. The restored database file modification times
    3. The backup manifest without subsequent change history
    4. The most recent account count from a monitoring chart

    Answer: Authoritative deletion records since the backup point

    Recovery must respect later deletions and retention obligations. Replaying data without the relevant deletion history can resurrect records incorrectly.

  50. 50.A partition map adds one equal-capacity node to a consistent-hash ring. What is its main placement benefit compared with remapping every key?

    Show answer and explanation
    1. No key ever changes owner
    2. Only a subset of key ownership normally moves
    3. Hot keys automatically stop being hot
    4. Every node stores an identical full copy

    Answer: Only a subset of key ownership normally moves

    Consistent hashing reduces remapping on membership changes. It does not eliminate movement, replication design, capacity imbalance, or hot-key concentration.

  51. 51.A single popular document dominates one shard's traffic while other shards are idle. Why might adding ordinary hash shards not help?

    Show answer and explanation
    1. The same key still maps to one ownership unit
    2. Hashing distributes each read across all shards
    3. The document's value must become smaller
    4. The routing table cannot contain more nodes

    Answer: The same key still maps to one ownership unit

    Hash partitioning spreads different keys, not necessarily one key's work. Caching, replication, batching, or an application-specific split may be needed.

  52. 52.A key range moves while clients continue writing. What does the handoff protocol need to establish?

    Show answer and explanation
    1. Which owner may accept each write during transition
    2. That every request uses a new random key
    3. That both owners may independently acknowledge all writes
    4. That the old owner's audit log is removed first

    Answer: Which owner may accept each write during transition

    Migration must preserve a clear write authority or coordinated forwarding rule. Otherwise acknowledged writes can split across incompatible owners.

  53. 53.A client sends a write using an obsolete shard map. What response best supports safe routing?

    Show answer and explanation
    1. Assume the old map remains authoritative forever
    2. Apply the write to an unrelated local shard
    3. Reject or redirect with a newer routing epoch
    4. Change the operation identifier before retrying

    Answer: Reject or redirect with a newer routing epoch

    Versioned routing lets servers detect stale placement knowledge. Retries must preserve operation identity and respect the current ownership rules.

  54. 54.A migration independently writes each update to old and new databases. One write can succeed while the other fails. What remains necessary?

    Show answer and explanation
    1. An equal timeout for the two independent writes
    2. Routing both writes through the same client process
    3. A durable method to detect and reconcile divergence
    4. Matching row counts at the start of the migration

    Answer: A durable method to detect and reconcile divergence

    Independent dual writes are not atomic. An authoritative change log, outbox, or equivalent recovery process must account for partial success.

  55. 55.A deleted key is absent on one replica but still present on an offline replica. Why retain a deletion tombstone?

    Show answer and explanation
    1. To make every replica immediately reachable
    2. To distinguish deletion from missing replication state
    3. To prevent any future key with that spelling
    4. To increase the deleted value's retention forever

    Answer: To distinguish deletion from missing replication state

    A deletion marker carries versioned evidence that older values should not reappear. Its lifecycle must match repair and replica recovery assumptions.

  56. 56.A team discards deletion markers before a long-offline replica rejoins. What failure should it test?

    Show answer and explanation
    1. Network packets losing their checksums
    2. Old values returning during reconciliation
    3. The quorum size increasing by one
    4. Every new value becoming encrypted twice

    Answer: Old values returning during reconciliation

    If returning replicas can present versions older than forgotten deletions, repair may resurrect data. Retirement needs a safe recovery or rejoin policy.

  57. 57.A read detects an older replica and asynchronously schedules repair. What should a client not infer merely from that scheduling?

    Show answer and explanation
    1. That the inconsistency was observed
    2. That another replica held a newer version
    3. That every future replica read is already current
    4. That a repair task was requested

    Answer: That every future replica read is already current

    A scheduled repair is not a completed durability or consistency guarantee. Subsequent reads still depend on the actual read protocol and repair progress.

  58. 58.Two large replicas need to locate differing key ranges without initially exchanging every record. What is a useful technique?

    Show answer and explanation
    1. Compare only total database file size
    2. Compare the number of successful health checks
    3. Compare hierarchical range digests
    4. Sort hosts by their network addresses

    Answer: Compare hierarchical range digests

    Hierarchical hashes can narrow differences to smaller ranges. Matching file sizes or health counts do not establish equivalent data.

  59. 59.Replicas merge states in arbitrary order and may receive duplicate states. Which merge properties support deterministic convergence?

    Show answer and explanation
    1. Strict dependence on arrival order
    2. Reliance on synchronized local display clocks
    3. A different rule for every retry
    4. Associativity, commutativity, and idempotence

    Answer: Associativity, commutativity, and idempotence

    Those algebraic properties make merge order and duplicate delivery harmless for the supported state model. Convergence still requires eventual exchange of relevant updates.

  60. 60.A counter only increases, with each replica owning its own component. How can merged states avoid counting the same replicated increment twice?

    Show answer and explanation
    1. Sum entire received states on every delivery
    2. Average all replica totals after each message
    3. Take each component's maximum, then sum
    4. Choose the state with the longest hostname

    Answer: Take each component's maximum, then sum

    Per-replica monotonic components retain the greatest observed contribution. Adding whole received totals repeatedly would duplicate already represented increments.

  61. 61.A replicated set must distinguish removing an observed insertion from removing a later concurrent insertion of the same value. What metadata helps?

    Show answer and explanation
    1. Distinct tags for individual insertion events
    2. One unversioned boolean for the whole set
    3. A shared constant timestamp for every operation
    4. Only the displayed value's character count

    Answer: Distinct tags for individual insertion events

    Insertion identities let the remove operation identify which additions it observed. A bare value or single boolean loses the concurrency information.

  62. 62.A conflict rule chooses the larger wall-clock timestamp. One writer's clock jumps ahead by an hour. What is a plausible consequence?

    Show answer and explanation
    1. Its value can dominate later real-time updates
    2. The merge becomes independent of clock settings
    3. All writes remain ordered by actual completion time
    4. Every replica immediately detects the clock error

    Answer: Its value can dominate later real-time updates

    Wall-clock ordering can mistake clock error for a later update. Explain that tradeoff rather than claiming physical timestamps establish reliable causality.

  63. 63.Two version vectors are incomparable: each has a component greater than the other. What does that indicate under the vector-clock model?

    Show answer and explanation
    1. Neither version causally dominates the other
    2. Both versions necessarily contain identical values
    3. The larger sum is the causal successor
    4. One machine has definitely crashed

    Answer: Neither version causally dominates the other

    Incomparable vectors represent concurrent causal histories. Their payloads may still happen to agree; vector comparison describes history, not value equality.

  64. 64.A comment refers to a newly created document. A replica receives the comment before the document. Which condition would causal delivery enforce?

    Show answer and explanation
    1. Wait for all possible future comments
    2. Deliver the observed document dependency first
    3. Deliver the shorter record first
    4. Deliver every account's events in one global order

    Answer: Deliver the observed document dependency first

    A causally dependent update must not be exposed before its required predecessor. This does not require a total order over unrelated work.

  65. 65.Old data is encrypted with one key while new writes switch to another. What must a key-rotation plan retain until migration is verified?

    Show answer and explanation
    1. Only the key used by the newest application version
    2. Only metadata proving that re-encryption was scheduled
    3. The new key until the first successful write completes
    4. The ability to decrypt still-retained old records

    Answer: The ability to decrypt still-retained old records

    Re-encryption and retirement must account for old data, replicas, and backups. Dropping needed key material prematurely can make valid retained data unreadable.

  66. 66.During a rolling upgrade, old and new readers coexist. What is a safe first step when introducing a new field?

    Show answer and explanation
    1. Add it compatibly while old readers can still operate
    2. Immediately require it in every historical record
    3. Change existing field meaning without a version
    4. Delete the old representation before deploying readers

    Answer: Add it compatibly while old readers can still operate

    A compatible transition separates adding a representation from making it mandatory or removing the old one. Mixed-version behavior must be tested explicitly.

  67. 67.A release writes records the previous binary cannot parse. What does a binary-only rollback fail to address?

    Show answer and explanation
    1. Compatibility of the already-written data
    2. The previous deployment replica count
    3. The old binary location in the artifact store
    4. The earlier request timeout configuration

    Answer: Compatibility of the already-written data

    Rolling back executable code does not undo persistent schema changes. Recovery needs a compatible reader, a reversible migration, or a documented forward repair.

  68. 68.New protocol handling is deployed gradually. When should senders start emitting a format old receivers reject?

    Show answer and explanation
    1. Whenever the deployment dashboard first refreshes
    2. After the required receivers support that format
    3. As soon as the first sender is upgraded
    4. Before deploying any compatible receiver

    Answer: After the required receivers support that format

    Separate capability deployment from feature activation. Compatibility depends on the receiving population and rollback policy, not merely on one upgraded sender.

  69. 69.A report needs every shard for an exact total. One shard times out. What should the API avoid?

    Show answer and explanation
    1. Offering a documented retry path
    2. Presenting the partial sum as the exact complete total
    3. Returning an explicit incomplete-result status
    4. Identifying the missing shard in diagnostics

    Answer: Presenting the partial sum as the exact complete total

    Partial data may be useful only under an explicit contract. An exact aggregate cannot silently omit a required shard and remain an exact total.

  70. 70.A search index is updated asynchronously after document writes. What should the product promise avoid without an additional mechanism?

    Show answer and explanation
    1. Eventually indexing retained valid changes
    2. Reporting measurable indexing lag
    3. Immediate search visibility after every acknowledged write
    4. Allowing a direct authoritative document read

    Answer: Immediate search visibility after every acknowledged write

    Asynchronous indexing introduces a visibility gap. Read-your-writes search needs an explicit wait, overlay, routing rule, or other documented mechanism.

  71. 71.A backfill copies an old row after a newer update has already reached the destination through change capture. How can the destination avoid regression?

    Show answer and explanation
    1. Disable all destination checksums
    2. Trust whichever packet arrives last
    3. Compare authoritative versions before applying the copy
    4. Prefer every backfill record over live changes

    Answer: Compare authoritative versions before applying the copy

    A late old snapshot must not overwrite newer captured state. Version-aware application and a coordinated snapshot/change-stream boundary prevent this race.

  72. 72.A change-data pipeline forwards inserts and updates but drops delete events. Which destination property is compromised?

    Show answer and explanation
    1. The lexical ordering of field names
    2. Its maximum network transmission unit
    3. Faithful representation of the source's removals
    4. Its ability to allocate new storage blocks

    Answer: Faithful representation of the source's removals

    Without deletions or an equivalent reconciliation mechanism, the destination accumulates records the source no longer contains.

  73. 73.A processor advances its source checkpoint before making its output durable. What can a crash cause?

    Show answer and explanation
    1. Guaranteed duplication of every processed item
    2. Lost output that recovery skips
    3. Blocking of source writes until the consumer restarts
    4. Automatic rollback of all output writes

    Answer: Lost output that recovery skips

    If recovery resumes after work whose effects were not durable, that work may never be reproduced. Coordinate output commitment and checkpoint advancement.

  74. 74.A writer commits data, then invalidates a cache. A reader that fetched older data earlier fills the cache afterward. What race remains?

    Show answer and explanation
    1. The database commit is automatically undone
    2. The cache must detect the race from value length
    3. The invalidation guarantees all later fills are new
    4. The stale fill can repopulate the cache

    Answer: The stale fill can repopulate the cache

    Invalidation alone does not order in-flight fills. Version checks, generation tokens, or another coordinated caching protocol are needed.

  75. 75.A popular cached value expires and 800 requests simultaneously recompute it. What can request coalescing reduce?

    Show answer and explanation
    1. Duplicate regeneration work for that value
    2. The underlying source's required correctness checks
    3. The lifetime of every unrelated cache entry
    4. The need for any overload budget

    Answer: Duplicate regeneration work for that value

    Coalescing lets one bounded regeneration serve multiple waiters. Its failure, timeout, and stale-value policies still need explicit treatment.

  76. 76.An absent username is cached as unavailable for ten minutes, then an account is created with that name. What needs attention?

    Show answer and explanation
    1. Reading a different replica with the same negative entry
    2. Invalidating or bounding the stale absence result
    3. Increasing the positive-entry cache lifetime
    4. Refreshing only usernames that already exist

    Answer: Invalidating or bounding the stale absence result

    Negative entries cache absence as data. Creation can make them stale, so their invalidation and lifetime affect visibility just like positive cache entries.

  77. 77.A catalog caches assets by immutable content hash and checks a current manifest pointer on each request. Why can old asset cache entries remain safely reusable?

    Show answer and explanation
    1. The manifest pointer never needs a consistency contract
    2. The same hash identifies the same verified content
    3. Cached assets can be edited in place without changing keys
    4. Every cached asset is automatically the newest release

    Answer: The same hash identifies the same verified content

    Immutable keys separate content reuse from release selection. Freshness comes from selecting the current manifest, while hash verification protects revision identity.

  78. 78.A global limit allows 1,000 operations per minute. Four independent nodes each enforce 1,000 locally. What is the aggregate flaw?

    Show answer and explanation
    1. The limit is enforced by whichever node starts first
    2. The global allowance automatically falls to 250
    3. The four counters form a coordinated shared budget
    4. They can admit roughly 4,000 in the same minute

    Answer: They can admit roughly 4,000 in the same minute

    Independent full-size allowances add together. Enforce a shared budget or deliberately partition the allowance with a documented error model.

  79. 79.A token bucket has capacity 30 and refills at five tokens per second. It starts full and receives no refill during an instantaneous burst. How many one-token requests can pass immediately?

    Show answer and explanation
    1. 150
    2. 6
    3. 5
    4. 30

    Answer: 30

    The initial burst is bounded by the 30 stored tokens. The refill rate controls how quickly capacity returns after the burst.

  80. 80.An inventory hold expires while a delayed payment confirmation is in flight. What must finalization check?

    Show answer and explanation
    1. That the hold is still valid under the state-transition rules
    2. That the payment confirmation arrived over a reliable connection
    3. Only that a matching hold existed when payment began
    4. Only that the client retries with the original operation ID

    Answer: That the hold is still valid under the state-transition rules

    Finalization must atomically validate the current hold and apply a permitted transition. A historical identifier alone does not prove current ownership or availability.

  81. 81.A user pages through a changing dataset and requires a stable, complete view of the original result. What should the continuation token identify?

    Show answer and explanation
    1. Only the last offset in the current live result
    2. A different random replica for each page
    3. Only the number of rows returned on the previous page
    4. The query position and an appropriate snapshot

    Answer: The query position and an appropriate snapshot

    A stable snapshot prevents concurrent insertions and removals from changing the result universe mid-pagination. Retention and token-expiry behavior must also be defined.

  82. 82.A file passes transport checks but is later stored under the wrong object identifier. What does an application-level digest tied to the intended object help verify?

    Show answer and explanation
    1. The sender authorization without a trusted identity check
    2. The content delivered for that object's identity
    3. The object owner solely from the content bytes
    4. The availability of every intermediate service

    Answer: The content delivered for that object's identity

    End-to-end content validation can catch errors outside one transport segment. A digest does not by itself establish ownership or authorization.

  83. 83.An attacker can replace both a file and its unkeyed checksum. What additional property is missing from the checksum alone?

    Show answer and explanation
    1. The ability to recompute the checksum
    2. Detection of random bit changes under normal use
    3. Authenticated integrity
    4. A fixed-length representation

    Answer: Authenticated integrity

    An unkeyed digest can detect accidental damage but does not authenticate a source that an attacker can impersonate. Use an appropriate trusted signature or MAC boundary.

  84. 84.A node misses a configuration update that revokes its write authority. Which design reduces reliance on that node noticing the update promptly?

    Show answer and explanation
    1. Rely on the node periodically polling its role flag
    2. Use the node's last successful heartbeat as write authority
    3. Extend the configuration cache lifetime during failover
    4. Enforce versioned authority at the write destination

    Answer: Enforce versioned authority at the write destination

    A destination that validates current fencing or authorization state can reject stale actors. Monitoring alone does not enforce the revocation.

  85. 85.A failover drill moves application servers but still uses a name resolver in the failed site. What has the drill exposed?

    Show answer and explanation
    1. A need for identical application replica counts
    2. A hidden dependency in the recovery path
    3. A failure that moving application servers alone has ruled out
    4. Proof that the database snapshots contain wrong rows

    Answer: A hidden dependency in the recovery path

    Recovery depends on the complete service chain, including naming, credentials, configuration, and control planes. Moving compute alone does not validate that chain.

  86. 86.Logs show one user action created two reservations on different nodes. What identifier would most directly connect both attempts for diagnosis?

    Show answer and explanation
    1. A different random identifier for every log line
    2. Each process's current memory usage
    3. The stable logical operation identifier
    4. The length of the customer's name

    Answer: The stable logical operation identifier

    A shared operation identity distinguishes retries of one action from independent actions. Trace and attempt identifiers can add detail without replacing that logical link.

  87. 87.A team tests only clean process shutdowns. Which additional test targets ambiguous completed operations?

    Show answer and explanation
    1. Change the dashboard refresh interval
    2. Lower image resolution in the client
    3. Restart only after every request has drained
    4. Drop the reply after durable application, then retry

    Answer: Drop the reply after durable application, then retry

    A lost response after commitment exercises the gap between server effect and client knowledge, revealing duplicate-handling and recovery errors that clean shutdowns miss.

  88. 88.A concurrency test checks whether every observed response fits a legal sequential history respecting completed-before-started operations. What is it evaluating?

    Show answer and explanation
    1. Whether every replica uses the same file format
    2. The visual order of events in a dashboard
    3. Linearizability for the modeled object
    4. Whether mean latency is below one millisecond

    Answer: Linearizability for the modeled object

    A history checker compares operation intervals and responses with a specification. Its result is limited by the modeled object, recorded evidence, and tested executions.

  89. 89.A distributed test changes wall-clock time while leaving packet delivery normal. What class of assumptions can this probe?

    Show answer and explanation
    1. Whether every disk block is physically adjacent
    2. Only the maximum network packet size
    3. Timestamp and lease behavior under clock changes
    4. Only the compiler's symbol table

    Answer: Timestamp and lease behavior under clock changes

    Clock perturbation targets code that equates wall time with elapsed time or ordering. It complements, rather than replaces, partition and pause tests.

  90. 90.One tenant creates many expensive scans while others issue small key lookups. Which admission policy better protects shared service?

    Show answer and explanation
    1. Count all scans as zero-cost background work
    2. Allocate solely by the number of open browser tabs
    3. Account for per-tenant resource cost and concurrency
    4. Give every request unlimited execution time

    Answer: Account for per-tenant resource cost and concurrency

    Request counts alone may hide large cost differences. Fairness should reflect constrained resources and preserve explicit workload budgets.

  91. 91.Two services interpret a four-byte length prefix using different byte orders. What should their protocol specify?

    Show answer and explanation
    1. The numeric range but no representation of its bytes
    2. The sender's native in-memory layout without a wire rule
    3. The receiver's host byte order for every sender
    4. The exact integer encoding and byte order

    Answer: The exact integer encoding and byte order

    A wire format must define how bytes represent values. Native in-memory conventions are not a portable network contract.

  92. 92.A TCP receiver gets one complete message and half of another in one read. What must its parser do?

    Show answer and explanation
    1. Treat each read call as one complete application message
    2. Discard bytes beyond the first message
    3. Assume the second half was lost permanently
    4. Use explicit framing and retain the incomplete bytes

    Answer: Use explicit framing and retain the incomplete bytes

    TCP exposes an ordered byte stream, not application message boundaries. The parser must handle split and combined arrivals according to the framing format.

  93. 93.A dependency connection fails certificate verification after a deployment. What is the sound initial response?

    Show answer and explanation
    1. Retry using the same invalid trust setup forever
    2. Inspect trust, hostname, validity, and deployed certificate evidence
    3. Disable verification across every environment
    4. Assume the application's database is corrupt

    Answer: Inspect trust, hostname, validity, and deployed certificate evidence

    Certificate failure has specific causes that should be investigated. Bypassing authentication conceals the fault and changes the security contract.

  94. 94.A valid service certificate suddenly appears not yet valid on one host after its clock changes. What should be compared first?

    Show answer and explanation
    1. The number of entries in the application cache
    2. The certificate filename's character count
    3. The caller's average request payload size
    4. That host's time against trusted time and certificate validity

    Answer: That host's time against trusted time and certificate validity

    Certificate validity checks use time. A host clock error can explain a host-specific rejection even when the deployed certificate is otherwise appropriate.

  95. 95.Two editors read configuration version 12 and submit replacements that require version 12. What should an atomic compare-and-swap allow?

    Show answer and explanation
    1. One succeeds; the other must refresh after the version changes
    2. The request with the earlier client timestamp wins
    3. The replacement with the larger serialized value wins
    4. Both succeed because they read the same initial version

    Answer: One succeeds; the other must refresh after the version changes

    An atomic version condition prevents blind lost updates. The losing editor must inspect the new state rather than silently overwrite it.

  96. 96.A dashboard reads a projection 40 seconds behind the source log. Which observation makes its lag interpretable?

    Show answer and explanation
    1. Only the count of currently connected clients
    2. Only the most recent successful projector health probe
    3. The source position represented by the projection
    4. Only the time the dashboard HTML was rendered

    Answer: The source position represented by the projection

    A fresh page can display old data. Track the authoritative progress point or event time represented, together with its measurement assumptions.

  97. 97.A new voter needs hours to copy historical data. What is a common reason to catch it up before counting it toward an expanded quorum?

    Show answer and explanation
    1. Avoid making normal commitment depend on an unready voter
    2. Eliminate the need to validate transferred state
    3. Guarantee that no existing voter can fail during transfer
    4. Permit independent old and new majorities immediately

    Answer: Avoid making normal commitment depend on an unready voter

    Adding an unready voting member can change quorum requirements before it can contribute. Membership protocols must preserve both safety and operational readiness.

  98. 98.A leader commits only after acknowledgments from a majority that necessarily includes a distant region. Which lower bound affects write latency?

    Show answer and explanation
    1. The fastest unrelated replica's read latency
    2. Only the response body's text encoding time
    3. Communication with that required remote quorum
    4. Only the leader's local cache lookup time

    Answer: Communication with that required remote quorum

    Required remote agreement is on the critical path. Faster local processing cannot remove the communication needed by the chosen placement and commitment policy.

  99. 99.A feature needs an exact single-owner allocation, while an analytics panel tolerates delayed totals. What design principle follows?

    Show answer and explanation
    1. Use the analytics lag to justify duplicate allocations
    2. Assume one timestamp solves both contracts
    3. Choose consistency separately for the two requirements
    4. Force both features to use identical semantics

    Answer: Choose consistency separately for the two requirements

    Different invariants need different guarantees. Explicitly map each operation's correctness and availability requirements rather than applying one vague consistency label everywhere.

  100. 100.A cluster shows divergent acknowledged state after a recovery drill. What should the investigation preserve before destructive repair?

    Show answer and explanation
    1. Only successful requests after the drill finishes
    2. The repaired state after discarding divergent logs
    3. Logs, snapshots, request histories, and ownership transitions
    4. Only a current replica row-count comparison

    Answer: Logs, snapshots, request histories, and ownership transitions

    Preserve evidence needed to reconstruct the failure before repairs erase it. Then contain the incident and recover through the authoritative, reviewed procedure.

  101. 101.A former leader is isolated from the current voting majority but still has its old role flag. What must a linearizable read protocol establish before trusting its local state?

    Show answer and explanation
    1. Only that it once won an election
    2. Only that the requested key is present
    3. Only that its local log has no checksum errors
    4. Current read authority under the protocol

    Answer: Current read authority under the protocol

    A stale role flag does not prove current authority or freshness. The read protocol needs a valid quorum, lease, or other justified mechanism consistent with its timing assumptions.