Question 61
HardWith N = 5 replicas, a system uses W = 3 and R = 2. Is a read guaranteed to see the latest write?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
With N = 5 replicas, a system uses W = 3 and R = 2. Is a read guaranteed to see the latest write?
No, because R + W = 5 is not greater than N
Only for deletes
Only if N = 3
Yes
Sign up free to see the answer and a step-by-step explanation.
With N = 3 replicas, which setting gives strong consistency while tolerating one replica being down for both reads and writes?
W = 2, R = 2
W = 1, R = 1
W = 1, R = 3
W = 3, R = 1
Sign up free to see the answer and a step-by-step explanation.
Under the PACELC theorem, what trade-off exists even when there is no network partition?
Cost versus size
Read versus write speed only
Availability versus durability
Latency versus consistency
Sign up free to see the answer and a step-by-step explanation.
A key-value store uses consistent hashing with virtual nodes. What do virtual nodes improve?
Join performance
The evenness of the load across physical servers
Encryption
Query language support
Sign up free to see the answer and a step-by-step explanation.
What is a 'hinted handoff' in Dynamo-style databases?
A temporary replica stores writes for a down node and passes them on when it recovers
Moving a user to another server
Sharing passwords
Dropping writes
Sign up free to see the answer and a step-by-step explanation.
How do vector clocks help in eventually consistent systems?
They speed up reads
They encrypt timestamps
They keep all clocks synchronised
They show whether two versions are causally related or concurrent conflicts
Sign up free to see the answer and a step-by-step explanation.
What is 'last write wins' conflict resolution, and what is its risk?
Keeping the version with the latest timestamp; concurrent updates can be silently lost
Rejecting all writes
Asking the user every time
Keeping all versions forever
Sign up free to see the answer and a step-by-step explanation.
A product catalogue in MongoDB needs fast lookups by category and price range. Which index helps most?
A compound index on (category, price)
An index on _id only
A text index
No index
Sign up free to see the answer and a step-by-step explanation.
In Cassandra, what is the partition key used for?
Joining tables
Encrypting rows
Sorting rows within a partition
Deciding which node stores the row
Sign up free to see the answer and a step-by-step explanation.
A Cassandra table is designed with user_id as partition key and event_time as clustering column. Which query is efficient?
All events in a time range for every user
Joins with another table
All events for one user in a time range
Events by type across users
Sign up free to see the answer and a step-by-step explanation.