Database Selection and Trade-offs Questions
Choosing the right database and data platform for a workload: relational versus NoSQL versus specialized stores, managed versus self-hosted, and matching technology to consistency, scale, cost, and query or access-pattern needs. Covers OLTP versus OLAP and transactional-versus-analytical workload splits, polyglot persistence across multiple data stores, structuring an ambiguous selection prompt, naming trade-offs, and defending a recommendation to stakeholders.
Your product includes three modules: time-series metrics, relational transactional records, and full-text search. Discuss pros and cons of using relational databases, columnar stores, NoSQL key-value stores, and managed search services for each module. Recommend a storage technology per module and justify based on access patterns, consistency semantics, scalability, and operational cost.
Sample Answer
Direct answer
Time-series metrics belong in a purpose-built time-series or columnar store, relational transactional records belong in a relational database (RDBMS), and full-text search belongs in a managed search service. Each module has a fundamentally different access pattern, and forcing all three onto one store family means picking a technology that is merely adequate at two of the three jobs instead of good at all three.
Structured elaboration
| Module | RDBMS | Columnar store | NoSQL key-value | Managed search service |
|---|---|---|---|---|
| Time-series metrics | Row-oriented writes and B-tree indexes (the tree-shaped lookup structure most relational databases build by default to find one row quickly) don't exploit the fact that adjacent points in a series are highly similar, so storage and scan cost stay high as volume grows | The natural fit: values in a column compress well because adjacent points in one series are numerically close, and aggregation queries only read the columns they need | Fast single-key writes, but aggregating across a time range and many series means either wide scans or maintaining your own rollups; you lose the query-time flexibility a time-oriented engine gives for free | Wrong shape entirely: search services rank and tokenize text, they don't aggregate numeric series efficiently |
| Relational transactional records | The natural fit: multi-row ACID (atomicity, consistency, isolation, durability, the reliability guarantees a database gives a transaction) transactions, foreign keys, and a mature query planner for the joins these records need | Column stores batch and often defer visibility of writes, which fights a workload that needs immediate, consistent reads of a just-written row | Loses multi-row transactions (a payment and an order status must commit together); workable only if you restructure the domain to avoid needing that | Wrong shape: no transactional guarantees, and full-text ranking is not what an order record needs |
| Full-text search | A tsvector-style extension can do search adequately at moderate corpus size, but lacks the relevance tuning, typo tolerance (still returning a match when the query is misspelled), and faceting (counting and grouping the matched results by an attribute, like brand or price range) a dedicated engine has | Not built for token-level inverted-index (a lookup structure that maps each word to every document containing it, the reverse of a normal index) lookups; you'd be reimplementing a search engine's core data structure yourself | Only workable for exact-key lookups, not "find documents containing these words ranked by relevance" | The natural fit: inverted indexes, BM25-style relevance ranking (scoring how well each match fits the query, not just whether it matches at all), faceting, and typo tolerance are the engine's whole purpose |
Justification against the stated axes
- Access pattern. Metrics are written in high-volume append-only bursts and read as range aggregations over a handful of columns; transactional records are written and read one row (or a small joined set) at a time with a need for correctness across rows; search queries are read-mostly, ranked, and tolerant of eventual consistency with the source of truth.
- Consistency semantics. Transactional records need strict, immediate consistency (a balance update must be visible the instant it commits). Metrics and search results are both fine as eventually consistent: a dashboard a few seconds stale or a search index a few seconds behind a content edit rarely matters operationally.
- Scalability. Metrics volume grows with instrumentation density and retention, columnar engines scale that horizontally by adding storage nodes with predictable compression. Search scales by sharding the index. Transactional scale is usually bounded by what a well-tuned single primary (plus read replicas) can do, since most transactional workloads are not actually write-volume-bound in the way metrics ingestion is.
- Operational cost. Running three different technologies is real overhead (three sets of on-call runbooks, three upgrade cadences), which is the strongest argument for consolidating where the access pattern allows it, but not for forcing the transactional and search modules onto whichever store handles metrics well, since their access patterns are genuinely incompatible with that engine.
Worked example
Assume 5,000 distinct metric streams (a "stream" being one host/metric combination) each emitting a point every 10 seconds: 5,000 divided by 10 is 500 points per second system-wide, times 86,400 seconds a day is 43,200,000 points a day. A raw point (an 8-byte timestamp, 8-byte metric id, 8-byte value) is 24 bytes uncompressed, so raw volume is 43,200,000 times 24 bytes, 1,036,800,000 bytes, about 1,036.8 MB a day. If we conservatively model 8x compression from column-oriented delta and dictionary encoding (dictionary encoding compresses well specifically when a column has low cardinality, meaning few distinct repeating values, which is typical for tag and metric-name columns), an assumption representative of how columnar time-series engines commonly perform, not a benchmark run here, that's about 129.6 MB a day, roughly 3.9 GB a month, versus roughly 31.1 GB a month stored uncompressed in a generic row store for the same ingestion rate. That gap compounds every month you retain data, which is why the columnar choice for this module is not a stylistic preference.
Trade-offs & pitfalls
The main pitfall is over-fragmenting: a team that reaches for a fourth or fifth specialized store for every new access pattern ends up spending more engineering time on data movement and consistency between stores than the specialization saves. Keep the boundary at genuinely different access patterns, not at every minor variation. A second pitfall is using the RDBMS's built-in full-text extension past the point it was designed for: it's a reasonable choice for a small corpus with simple search needs, but a team that keeps tuning it as the corpus and query complexity grow is usually delaying, not avoiding, the move to a dedicated search service.
Explain the differences between ACID and BASE properties and between strong, causal, and eventual consistency models. Describe how these models affect availability, latency, developer mental models, and operational complexity in distributed databases. Provide one concrete example where BASE is acceptable and one where ACID is required.
Sample Answer
Direct answer
Atomicity, consistency, isolation, durability (ACID) describes the guarantee a traditional relational transaction gives you: it either fully happens or not at all, it leaves the database in a valid state, it's isolated from other concurrent transactions, and once committed it survives a crash. Basically available, soft state, eventually consistent (BASE) describes the opposite design philosophy many distributed NoSQL systems adopt: stay available under load or partition by relaxing the promise that every read reflects the very latest write, accepting instead that replicas will converge soon rather than agree immediately.
Structured elaboration
The consistency spectrum between these two poles:
- Strong consistency: every read sees the latest committed write, as if there were a single copy of the data. Requires real-time coordination (for example a synchronous quorum acknowledgment) and so costs latency, and availability during a partition.
- Causal consistency: operations that are causally related (a reply is seen after the comment it replies to) are seen in the same order by everyone, but unrelated operations may appear in different orders on different replicas. Weaker coordination cost than strong consistency, while still preserving the orderings that usually matter to users.
- Eventual consistency: no ordering guarantee during propagation at all, only a promise that, absent new writes, all replicas will eventually agree. Cheapest in coordination cost, but pushes the most burden onto the application to tolerate or reconcile temporarily stale or conflicting reads.
Effects on the system and the team. Strong consistency costs latency and can cost availability during a partition, because the system has to wait for coordination before responding. Eventual consistency buys low latency and continuous availability, at the cost of a genuinely harder developer mental model: for example a user posts a comment, refreshes the page, and briefly doesn't see it because their read landed on a replica that hasn't caught up yet (a read-your-own-writes anomaly). Operationally, eventually-consistent BASE systems need an explicit conflict-resolution strategy for when two replicas accept concurrent writes to the same key: last-writer-wins by timestamp (simplest, but it silently discards whichever write loses the timestamp comparison), vector clocks (each replica tags its writes with a counter per replica, so the system can tell a truly concurrent write from one that clearly happened after another, instead of guessing), or conflict-free replicated data types (CRDTs: data structures like counters or sets built so that merging two conflicting versions always lands on the same result, no matter what order the merge happens in). ACID systems push that complexity into lock and isolation-level tuning on a single logical system instead.
Worked example
Where ACID is required: transferring funds between two accounts in one database. Debiting account A and crediting account B must both happen or neither happens (atomicity), and no concurrent read may observe a state where money has left A but hasn't yet arrived in B (isolation). This is the textbook case for a transaction wrapped in BEGIN/COMMIT on a relational engine like Postgres, because the cost of a partial or visibly-inconsistent transfer is unacceptable.
Where BASE is acceptable: a "like" or view counter on a social media post. If two regions briefly disagree on the exact count for a few seconds after a write, no one is harmed, and a system that stays available everywhere and converges shortly after (an eventually-consistent counter in a system like Cassandra, or a DynamoDB table read with eventually consistent reads) is a better engineering trade than paying synchronous cross-region coordination latency on every single increment.
Trade-offs & pitfalls
Real production systems are rarely purely one or the other. Postgres's own default isolation level (read committed) is weaker than full serializability, so "we use a relational database" doesn't automatically mean every transaction gets the strongest possible ACID guarantee available; the specific isolation level chosen matters, from read committed up through serializable (the strictest level, where concurrent transactions are guaranteed to behave as if they ran one after another in some order, ruling out the anomalies a weaker level would allow), and each level permits a different set of anomalies. Conversely, "NoSQL means BASE" is also an oversimplification: many document databases offer strong, majority-acknowledged writes or single-document transactional guarantees for a scoped operation. The consistency guarantee is a property of the specific system and its configuration, not a label that comes free with a product category.
As a full-stack lead, you must decide between building an in-house analytics store or using a managed warehouse (BigQuery or Snowflake). Compare ingestion patterns, query latency and concurrency, cost model (storage vs compute), staffing/operational burden, data governance, and integration with product analytics and BI tooling.
Sample Answer
Direct answer
For most companies below a large, sustained analytical scale, a managed warehouse (Snowflake or BigQuery) beats an in-house analytics store on total cost of ownership (TCO: the full cost of a system including infrastructure, licensing, and the staff time to run it, not just the sticker price of the software or hardware), because the dominant cost of running an analytics platform well is skilled staff time, not compute or storage, and a managed warehouse converts most of that staff time into a subscription. Build in-house only once data volume and query load are large and steady enough that the compute savings from full control genuinely outweigh a dedicated platform team's fully-loaded cost, which in practice means a scale most mid-size companies never reach.
The six comparison axes
| Axis | In-house (self-hosted open-source stack) | Managed warehouse (Snowflake/BigQuery) |
|---|---|---|
| Ingestion patterns | Full control over batch vs. streaming ingestion, but the team owns building and maintaining the pipeline tooling | Native connectors and streaming ingestion are largely built in; less flexibility for unusual formats, far less pipeline code to maintain |
| Query latency and concurrency | Can be tuned aggressively for a known workload, but concurrent ad-hoc query storms need careful cluster sizing and queuing the team designs itself | Elastic compute (Snowflake's separate warehouses, BigQuery's on-demand slots) absorbs concurrency spikes without manual intervention, at a direct dollar cost per spike |
| Cost model | Storage and compute costs are the infrastructure bill; the team also pays for every hour of engineering time spent operating it | Storage and compute are billed separately and scale with actual usage; no separate line item for "someone keeping the cluster alive," because that's included in the service |
| Staffing/operational burden | Needs dedicated data-infrastructure engineers for upgrades, tuning, capacity planning, and incident response | Vendor operates the cluster; the team still needs data engineers to build pipelines and model data, but not to keep the database itself alive |
| Data governance | The team builds access control, lineage, and audit logging itself, which is powerful but is real engineering work with no shortcut | Built-in role-based access control, often built-in lineage and audit logging, integrated with the vendor's ecosystem |
| Integration with BI/product analytics | Requires building or maintaining connectors to BI tools | Deep, usually first-class integration with common BI tools, since that's a large part of the vendor's product surface |
Worked example: 5-year TCO
Model a company starting at 5 TB of analytical data, doubling every year for 5 years (a realistic early-growth curve), comparing Snowflake against a self-hosted open-source columnar stack (for example, ClickHouse or Presto+Parquet on self-managed infrastructure). Snowflake's rates below are current, verified list prices (Snowflake Service Consumption Table, effective 2026-09-23, AWS US East N. Virginia: storage $23/TB-month, Enterprise-edition compute at $3/credit; the model below runs a Medium warehouse, 4 credits/hour, up to 20 TB of data, scaling to a Large warehouse, 8 credits/hour, once data exceeds 20 TB). The in-house side has no published price list (it is infrastructure plus people), so every number there is an explicit, pinned assumption.
years = 5
data_TB = 5 # starting data volume
growth_factor = 2.0 # doubles each year
snowflake_storage_rate = 23 # $/TB-month, VERIFIED current list price
snowflake_credit_price = 3.0 # $/credit, Enterprise edition, within the verified $2-4 range
hours_per_day, days_per_year = 6, 365
inhouse_compute_rate = 0.045 # $/vCPU-hr, ASSUMPTION: blended generic cloud compute rate
inhouse_storage_rate = 0.023 # $/GB-month, ASSUMPTION: standard object storage
fully_loaded_salary = 190_000 # ASSUMPTION: fully loaded senior data-infra engineer, US market
snowflake_total = inhouse_total = 0.0
for year in range(1, years + 1):
credits_per_hr = 4 if data_TB <= 20 else 8
sf_year = (credits_per_hr * snowflake_credit_price * hours_per_day * days_per_year
+ data_TB * snowflake_storage_rate * 12)
snowflake_total += sf_year
nodes = max(2, round(2 * data_TB / 10)) # ASSUMPTION: 2 nodes per 10 TB
fte = 1.0 + 0.25 * max(0, (data_TB - 10) / 10) # ASSUMPTION: staffing grows with scale
ih_year = (nodes * 16 * inhouse_compute_rate * 24 * 365
+ data_TB * 1000 * inhouse_storage_rate * 12
+ fte * fully_loaded_salary)
inhouse_total += ih_year
print(f"Year {year}: data={data_TB:.0f}TB Snowflake=${sf_year:,.0f} in-house=${ih_year:,.0f}")
data_TB *= growth_factor
print(f"5-year cumulative Snowflake: ${snowflake_total:,.0f}")
print(f"5-year cumulative in-house: ${inhouse_total:,.0f}")
Year 1: data=5TB Snowflake=$27,660 in-house=$203,994
Year 2: data=10TB Snowflake=$29,040 in-house=$205,374
Year 3: data=20TB Snowflake=$31,800 in-house=$268,249
Year 4: data=40TB Snowflake=$63,600 in-house=$393,998
Year 5: data=80TB Snowflake=$74,640 in-house=$645,495
5-year cumulative Snowflake: $226,740
5-year cumulative in-house: $1,717,110
Even with generous compute and storage assumptions for the in-house side, staffing dominates its cost (roughly 90% of the in-house total across all five years), which is why Snowflake comes out about 7.6x cheaper in this model despite paying a real premium on raw compute and storage. The conclusion flips only if the staffing assumption changes: a company that already has a data-infrastructure team running other self-hosted systems, where this platform is marginal additional load on existing headcount rather than a new hire, could see the in-house total drop by most of that $190K/year/FTE line, which is the actual decision point to interrogate, not the compute and storage numbers.
Trade-offs and pitfalls
- The staffing line is where this decision actually gets made, and it's the easiest one to underestimate. A team that assumes "we already know how to run databases" without pricing in upgrades, on-call, capacity planning, and the opportunity cost of that engineering time building something else will systematically undercount in-house TCO.
- Managed warehouse costs are not immune to runaway growth either. Uncontrolled ad-hoc querying against an on-demand-billed warehouse (BigQuery) or an oversized always-on warehouse (Snowflake) can surprise a team that assumed "managed" meant "predictable"; cost governance (query quotas, warehouse auto-suspend) is still real work, just less work than operating the database itself.
- Don't buy vendor lock-in blind. Both Snowflake and BigQuery use SQL dialects and platform-specific features that make a future migration nontrivial; that's a real cost of the "buy" decision, even though it rarely shows up in a TCO spreadsheet.
- At a large enough steady-state scale (typically hundreds of TB to petabytes with highly predictable, always-on compute needs), the compute cost advantage of self-hosted infrastructure can outweigh the staffing premium. That's a different regime from the 5-year growth curve modeled above, and the decision should be revisited, with real numbers, if the company gets there.
You must choose between a managed cloud OLAP service (e.g., BigQuery) and self-managed columnar cluster (e.g., Presto+Parquet on Kubernetes) for an analytics team. Compare them across performance predictability, TCO, administrative overhead, query concurrency, and vendor lock-in. For a team with 20 analysts and occasional heavy ad-hoc queries, which would you recommend and why?
Sample Answer
Direct answer
For a team of 20 analysts running occasional heavy ad-hoc queries, recommend the managed cloud OLAP (online analytical processing: query patterns dominated by large scans and aggregations, as opposed to OLTP, online transaction processing, which is dominated by many small transactional writes) service, BigQuery, over a self-managed Presto+Parquet cluster on Kubernetes. The deciding factor is not raw compute cost, where the two are close, but that a self-managed cluster is provisioned capacity billed whether it's busy or idle, and it needs a platform team to keep it healthy; at 20 analysts' actual query volume, that fixed cost overwhelms any per-query savings self-hosting offers.
Comparing the two on the five stated axes
| Axis | BigQuery (managed) | Presto+Parquet on Kubernetes (self-managed) |
|---|---|---|
| Performance predictability | Google auto-scales query execution; a single expensive ad-hoc query doesn't need capacity planning from your team, but concurrent heavy queries share a per-project fair-scheduling pool that can slow each other down unpredictably under load | Fully predictable only if you've provisioned for peak concurrency; if 20 analysts all fire heavy queries at once and you provisioned for average load, everyone queues |
| TCO (total cost of ownership) | Pay per TB scanned plus storage; no infrastructure or platform-team cost | Compute and storage costs plus a platform team's fully loaded salary to operate Kubernetes, Presto, and the Parquet layout; see the worked example below for how much that staffing line matters |
| Administrative overhead | Near zero: no cluster to patch, scale, or keep alive | Real, ongoing: Presto version upgrades, Kubernetes node management, Parquet file compaction (periodically rewriting many small files into fewer, larger ones so scans stay fast) and small-file cleanup, query engine tuning |
| Query concurrency | Google manages resource allocation across concurrent queries within your project's slot allotment | You own the scheduler configuration and capacity headroom; under-provisioning shows up as analysts waiting on each other's queries |
| Vendor lock-in | Real: BigQuery's SQL dialect and storage format are Google-specific, and moving off it later means rewriting queries and re-exporting data | Minimal: Parquet is an open, portable file format and Presto/Trino run on any infrastructure, so this stack is the more portable choice if lock-in is the team's top concern |
Cloud pricing components to model, explicitly
A cost comparison that skips any of these components understates one side or the other:
- Compute: BigQuery's per-TB-scanned on-demand rate, or a flat-rate/editions commitment; self-managed compute-hours for the Kubernetes node pool.
- Storage: BigQuery's active logical storage rate; object storage (S3/GCS-class: services like Amazon S3 or Google Cloud Storage that store flat, key-addressed files rather than a traditional filesystem) for the Parquet files in the self-managed case.
- Network egress: cost of moving data out of the cloud region or between the storage layer and compute nodes, often ignored until a cross-region setup makes it material.
- Committed-use / reserved discounts: BigQuery editions/flat-rate slots, or reserved-instance pricing for the self-managed nodes; both can shift the comparison significantly at steady, predictable load.
- Support tier cost: enterprise support contracts, if the team needs guaranteed response times, are a real line item on either side that's easy to forget in a first-pass estimate.
Worked example
Verified current BigQuery rates (cloud.google.com/bigquery/pricing, checked 2026-09-24): on-demand analysis at $6.25 per TiB scanned (US multi-region), with the first 1 TiB/month free, and active logical storage at $0.02 per GiB-month. Model 20 analysts each running 15 queries/day, 22 working days/month, averaging 50 GiB scanned per query, against a 20 TiB resident dataset.
analysts, queries_per_day, days = 20, 15, 22
scan_per_query_GiB, dataset_GiB = 50, 20_000
queries_per_month = analysts * queries_per_day * days
scanned_TiB = queries_per_month * scan_per_query_GiB / 1024
print(f"queries/month: {queries_per_month:,}, scanned: {scanned_TiB:.1f} TiB")
bq_compute = max(0, scanned_TiB - 1) * 6.25 # VERIFIED rate, first 1 TiB free
bq_storage = dataset_GiB * 0.02 # VERIFIED rate
print(f"BigQuery: ${bq_compute + bq_storage:,.2f}/mo (compute ${bq_compute:,.2f} + storage ${bq_storage:,.2f})")
# Self-managed: ASSUMPTION rates, pinned explicitly (no live quote for a specific node type)
nodes, vcpu_per_node, compute_rate = 10, 16, 0.045
storage_rate, fte, salary = 0.023, 1.5, 190_000
sm_compute = nodes * vcpu_per_node * compute_rate * 730
sm_storage = dataset_GiB * storage_rate
sm_staffing = fte * salary / 12
sm_total = sm_compute + sm_storage + sm_staffing
print(f"Self-managed: ${sm_total:,.2f}/mo (compute ${sm_compute:,.2f} + storage ${sm_storage:,.2f} + staffing ${sm_staffing:,.2f})")
queries/month: 6,600, scanned: 322.3 TiB
BigQuery: $2,407.91/mo (compute $2,007.91 + storage $400.00)
Self-managed: $29,466.00/mo (compute $5,256.00 + storage $460.00 + staffing $23,750.00)
At this team's actual query volume, BigQuery costs about 12x less than the self-managed cluster, almost entirely because the self-managed side pays for 1.5 platform engineers (an assumed, but realistic, staffing level to keep Presto and Kubernetes healthy) whether or not the cluster is busy. The break-even point, where BigQuery's scanned-data cost alone equals the self-managed cluster's fixed compute-plus-storage-plus-staffing cost, works out to roughly 4,700 TiB scanned per month in this model: about 15x this team's actual usage. Self-hosting would only become competitive if the team's query volume grew far beyond what 20 analysts running occasional heavy queries would plausibly generate, or if the platform team's time were already a sunk cost shared across other self-hosted systems.
Trade-offs and pitfalls
- The recommendation flips on scale, not on principle. Once sustained scanned-data volume is high enough (roughly 15x this team's usage, per the break-even above), the self-managed cluster's fixed cost starts to look cheap relative to BigQuery's linear per-scan billing.
- Vendor lock-in is real and worth naming, even when recommending BigQuery. If portability is a hard organizational requirement (regulatory, multi-cloud strategy), that can outweigh the cost argument; that's a legitimate reason to choose the more expensive, more portable option deliberately.
- BigQuery's on-demand billing rewards query discipline. An unindexed
SELECT *over a huge table is expensive precisely because you pay per byte scanned; partitioning and clustering the underlying tables materially changes the cost side of this comparison and should be table stakes before concluding BigQuery is "too expensive." - A self-managed estimate that omits Parquet file compaction and small-file cleanup will understate the real operational burden. Small-file proliferation from frequent writes is one of the most common sources of unplanned Presto-on-Parquet maintenance work.
Explain the CAP theorem and its practical implications when selecting a distributed database. Give concrete examples of systems that prioritize different trade-offs (for example Cassandra, PostgreSQL clusters, DynamoDB Global Tables) and describe how those choices affect availability and consistency during network partitions.
Sample Answer
Direct answer
The CAP theorem says that during a network partition (a period where some nodes can't communicate with others), a distributed system can keep serving strong consistency (every read reflects the latest committed write) or availability (every request gets a non-error response), but not both at once; it has to choose. Since networks will partition eventually regardless of design, the real, practical question a database selection has to answer is not "CP or AP in the abstract" but "when this system splits, which side loses service, and for how long, and does that match what this workload can tolerate."
Structured elaboration
- Cassandra: availability-favoring (AP) by default. During a partition, each side keeps accepting reads and writes, with per-query tunable consistency levels (for example
ONEorQUORUM, how many replicas must acknowledge before a request succeeds). Replicas that fell out of sync heal afterward through mechanisms like hinted handoff (a reachable node temporarily stores a write meant for an unreachable replica and forwards it once that replica comes back) and anti-entropy repair (a background process that compares replicas against each other and reconciles any differences it finds). The trade is that a client can observe stale or conflicting data during and shortly after a partition, in exchange for both sides of the split continuing to serve traffic. - Postgres clusters (a primary with synchronous or semi-synchronous streaming replication, typically managed by an orchestrator like Patroni): consistency-favoring (CP) by design. A synchronous-replication setup will block or fail a write rather than let the primary and a replica silently diverge, and failover tooling generally fences off a partitioned-away node instead of letting it keep accepting writes as a second primary, which would risk split-brain (two nodes both believing they are the authoritative writer). That fencing is what makes it CP: the minority side of a partition becomes unavailable rather than inconsistent.
- DynamoDB Global Tables: has shipped both trade-off points as explicit, named modes. The original design, multi-Region eventual consistency, is AP: each region accepts writes independently, replication catches up asynchronously, and a region cut off by a partition keeps serving local reads and writes, resolving conflicting updates from different regions with a last-writer-wins rule. As of June 2025, AWS added multi-Region strong consistency (MRSC) as an opt-in mode: a write is synchronously replicated to at least one other of exactly three configured regions before it acknowledges, and reads return the latest version, moving that table's behavior toward CP (a write needs a reachable quorum of regions, so an isolated region alone can't accept writes), and giving up the transaction application programming interfaces (APIs) as the cost of that stronger guarantee. This is a clean, current illustration that CAP behavior is a configuration choice a specific product exposes, not a fixed label stuck to a product name.
Worked example
A three-region Cassandra ring loses connectivity between one region and the other two for several minutes. Application writes hitting the isolated region with a local quorum (a majority of that region's own replicas) keep succeeding, because Cassandra is AP: it doesn't require agreement from the unreachable regions. A client reading from one of the other two regions during that window may not yet see the isolated region's writes, and won't until the partition heals and repair mechanisms replay the missed updates, an inconsistency window bounded by however long the partition actually lasts, not by any fixed number the system guarantees in advance.
Trade-offs & pitfalls
"AP" does not mean "no consistency guarantees ever"; it means consistency is negotiated per operation or achieved eventually, rather than enforced synchronously on every write. "CP" systems are not unavailable in normal operation; they are only unavailable specifically to the minority side of an active partition. A common pitfall is treating CAP as a complete design theory: it says nothing about the latency cost of staying consistent during ordinary, non-partitioned operation, which is a separate and often more frequently relevant trade-off (the PACELC framework extends CAP to cover exactly this: even without a partition, a system still has to choose between lower latency and stronger consistency on every single request, a trade-off CAP alone is silent on).
Unlock Full Question Bank
Get access to all 35 Database Selection and Trade-offs interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.