CS FundamentalsHardProduct-company system-design interview
During a network partition between two data centres, a replicated database must either reject some writes or accept writes on both sides that may conflict. Which statement reflects the CAP theorem?
- A. A distributed system can provide consistency, availability and partition tolerance all at once
- B. Under a partition, the system must choose between consistency (refuse or delay some operations) and availability (answer, possibly with stale or conflicting data)
- C. CAP applies only to single-node databases
- D. Partition tolerance can be switched off in the cloud
Correct answer: B. Under a partition, the system must choose between consistency (refuse or delay some operations) and availability (answer, possibly with stale or conflicting data)
Partitions cannot be ruled out in real networks, so the real choice during one is C versus A. When there is no partition, systems can offer both; PACELC adds the latency-versus-consistency trade-off.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- An order service and a payment service each own their database. Placing an order must reserve stock, charge the card and create the order…
- A circuit breaker protecting calls to a slow service has three states. Which sequence is correct?
- A Kubernetes pod takes 60 seconds to warm its cache after start-up. During that time it should get no traffic but must not be restarted…
- A CI workflow uses a build matrix of 3 operating systems x 4 language versions, with 2 specific combinations excluded. How many jobs run…
- Which pairing of security testing approaches is correct?
- A team uses Terraform. Someone changes a security-group rule by hand in the cloud console. What is this called, and what happens at the…