Data Platform Architecture and Technology Selection Questions
System-level design of an end-to-end data platform: component selection, build-vs-buy, tool trade-offs, and aligning platform architecture with organizational and analytics needs. Covers reasoning about the whole stack (ingestion through serving) and technology-choice justification. The architect-altitude view above any single pipeline.
Before a new executive-facing KPI goes live on a dashboard, what process would you run to validate it: reconciling it against source data, writing tests for edge cases, and setting up post-release drift monitoring and alerting? Name two concrete pitfalls that commonly slip through when a new metric is published without this process.
Sample Answer
Direct answer
Before a new executive KPI (key performance indicator) goes live, validate it with the same rigor you'd apply to any other production data artifact: define the exact calculation and its edge cases in writing, reconcile it against source data, write tests, get it peer-reviewed, and set up monitoring plus automated alerting for post-release drift, so the metric earns trust before it's in front of an executive, rather than the first real scrutiny happening after a wrong number is already published.
Structured elaboration
- Define calculation and edge cases explicitly: write down the exact formula, and just as importantly, the edge cases (how are nulls handled, what happens for a customer with zero activity, does a refunded transaction still count, how is a partial period handled), since these edge cases are almost always where two independently-built calculations of "the same" metric diverge.
- Identify and reconcile source data: trace the metric back to its actual source tables and confirm the join logic and filters match the written definition exactly, and reconcile a sample calculation by hand (or with an independent query) against the automated pipeline's output to confirm they agree before trusting the automated version.
- Unit and reconciliation tests: write an automated test with a small, known input dataset and a hand-computed expected output, so a future code change that accidentally breaks the calculation is caught immediately, not discovered months later when someone notices the number looks off.
- Peer review: have someone OTHER than the author review both the written definition and the implementation, a second pair of eyes catches edge-case gaps the original author, close to their own work, is prone to miss.
- Post-release drift monitoring and alerting: once live, monitor the metric's value against its own historical trend (the same anomaly-detection approach used for any other production metric), and attach an explicit alert rule on top of that monitor, for example paging or ticketing the metric owner if day-over-day (or period-over-period) movement exceeds a defined tolerance band (say, a shift of more than 3 standard deviations from the trailing baseline, or a sudden jump outside a fixed percentage band for a metric with a known stable range), so a future silent break in the underlying data or calculation gets caught and someone is actually notified quickly, rather than persisting undetected on an executive-facing number until someone happens to notice the dashboard looks off.
- Common pitfalls to watch for: a definition that's precise in prose but ambiguous in implementation (two engineers implementing the "same" written definition independently and getting different results due to an unstated edge case), and a metric that reconciles correctly against a SAMPLE but breaks at full scale due to a performance-driven shortcut in the production implementation that wasn't present in the validation sample.
Worked example
Concretely: a new "monthly active users" KPI is defined as "distinct users with at least one qualifying event in the calendar month." During review, a peer reviewer asks what happens to a user who signs up mid-month, are they counted proportionally or simply included if they had any qualifying event, exposing an edge case the original definition hadn't explicitly addressed. The team decides and documents: any qualifying event within the month counts the user fully, no proration, and this decision is added explicitly to the written definition. The reconciliation test computes the metric by hand against a small synthetic dataset covering exactly this mid-month-signup case, confirming the production implementation handles it as decided, catching a genuine implementation bug where the mid-month case had originally been silently excluded due to an off-by-one date-range filter. Once live, a drift alert is configured to page the metric's owning analyst if the day-over-day value moves more than 15% outside its trailing 28-day baseline, so a later silent break (say, a source-table schema change that quietly drops a join condition) gets flagged automatically within a day instead of being noticed weeks later by an executive asking why the number looks wrong.
Trade-offs and pitfalls
This validation process adds real time before a metric ships, which can feel like friction against a stakeholder wanting the new KPI live quickly, but the cost of skipping it, an executive-facing number that's wrong for weeks before anyone notices and has to walk back a public or internal claim built on it, is almost always higher than the validation time invested up front. The pitfall specifically worth naming is validating against a SAMPLE dataset that happens not to exercise the tricky edge cases (the mid-month signup case in the example above), a reconciliation test is only as good as the test data it's checked against, so deliberately constructing edge-case-covering test data, not just using whatever sample happens to be convenient, is what actually catches the bugs worth catching. A second pitfall is treating drift MONITORING as sufficient on its own, a dashboard trend line nobody is actively watching catches nothing in practice, the monitor only earns its keep once it's wired to an actual alert that reaches a named owner.
Compare a data mesh (federated, domain-oriented data ownership) to a centralized data platform. Discuss ownership, discoverability, governance, latency, cost, and developer velocity, and describe when an organization should favor one approach over the other.
Sample Answer
A data mesh decentralizes data ownership to the domain teams that generate it (marketing, orders, payments), each publishing "data products" with clear contracts, while a centralized platform keeps one team owning ingestion, transformation, and the warehouse for the whole company.
The comparison
Ownership: mesh puts the people closest to the data (who understand it best) in charge of its quality and its contract; centralized puts one platform team in charge of everyone's data, whether or not they understand every domain equally well.
Discoverability: mesh requires a strong shared catalog and standardized metadata across domains, or discovery becomes worse than centralized, since data is now scattered across many owners. Centralized discovery is simpler by construction because everything sits in one place.
Governance: mesh uses federated computational governance, shared standards enforced by tooling (schema validation, SLAs as code) rather than a single team manually reviewing everything; centralized governance is easier to enforce consistently because one team controls the whole pipeline, but that team becomes a bottleneck as the company grows.
Latency (time-to-new-data-product): mesh domain teams can ship a new data product without waiting on a central team's backlog; centralized platforms often become the bottleneck once a company has more than a handful of domains competing for the same platform team's attention.
Cost: mesh usually costs more in tooling and duplicated infrastructure across domains; centralized concentrates cost (and the ability to optimize it) in one place.
Developer velocity: mesh scales velocity horizontally (more domains means more parallel capacity) once the platform is mature; centralized velocity is capped by the size of the platform team, and that cap gets worse as the company scales.
When to favor each
Favor a centralized platform when the organization has fewer than roughly a dozen distinct data domains, when the central platform team is not yet a bottleneck, and when the cost and complexity of federated governance tooling would outweigh its benefit. A 50-person company with three product lines rarely needs a mesh; it needs a competent, well-staffed central team.
Favor a data mesh once a large organization has enough independent domains (order of dozens or more) that a central team has become the bottleneck for every new dataset, and once there is executive appetite to invest in the self-serve platform and governance tooling a mesh requires to avoid becoming an ungoverned mess of inconsistent, undiscoverable domain data. A mesh adopted before that tooling investment is made tends to produce exactly the failure mode critics warn about: each domain reinventing its own formats and quality bar, with no way to reliably query across domains.
Trade-offs and pitfalls
The most common mistake is adopting "data mesh" as an organizational restructuring (just move ownership to domain teams) without investing in the platform and governance tooling that makes federation work; the result is worse than a centralized platform, because now nobody is accountable for cross-domain consistency at all. The second is applying mesh principles to an organization too small to need them, which adds coordination overhead (data contracts, domain-team accountability meetings) that a single central team would have handled faster.
You must evaluate whether to build a data-platform component in-house (e.g. a data catalog, an orchestrator) or adopt a managed/vendor solution, for an organization with mixed data maturity. Outline an evaluation framework covering multi-year total cost of ownership, vendor lock-in risk, time-to-value, and team skills, and describe how you would pilot before committing.
Sample Answer
The build-versus-buy question is really an evaluation-framework question: what does it cost to build and maintain this ourselves, what does it cost to adopt a managed solution, and which risk profile fits the team's actual skills and time horizon.
The evaluation framework
Total cost of ownership over 3+ years, not just sticker price: for building, this means engineer salary time for initial build plus ongoing maintenance, infrastructure costs, and the opportunity cost of that engineering time not going toward the product. For buying, this means license or usage-based fees plus the (often underestimated) integration, migration, and customization work.
Vendor lock-in risk: how hard would it be to leave this vendor later. Standard, open interfaces (SQL, open table formats, exportable metadata) are low risk; a proprietary API that "traps" your metadata or code is high risk.
Time-to-value: building takes months before the first real user benefits; a managed solution can often deliver value in weeks, which matters when the business need is urgent.
Team skills and headcount: building and then operating a component like a data catalog or an orchestrator requires ongoing engineering attention, not just an initial build. A team without a dedicated platform engineer is signing up for perpetual part-time maintenance if it builds.
Worked example: build or buy a data catalog
Say a 500-person company with mixed data maturity is deciding whether to build a lightweight internal catalog (a service plus a UI reading table metadata from the warehouse) or adopt a managed catalog product. Building might cost an estimated 2 engineers for 3 months to reach a usable first version (roughly half an engineer-year), then an ongoing 20 to 30 percent of one engineer's time to maintain and extend it as new data sources are added. Buying costs a recurring subscription fee, but reaches a usable state in weeks rather than months, and the vendor absorbs the maintenance burden of keeping up with new source-system integrations. If the company has no dedicated platform team and catalog needs are fairly standard (ownership, lineage, search), buying wins on time-to-value and total cost once you count engineer time honestly. If the company's catalog needs are unusual (deep integration with a proprietary internal system no vendor supports out of the box), building may be the only realistic option regardless of cost.
How to pilot before committing
Run a bounded pilot, a single team or a handful of high-traffic datasets, on the leading option (build a minimal version, or trial the vendor) for a fixed period, with a small number of concrete success criteria defined up front: does search actually return the right table in under a specified number of clicks, does the team's satisfaction improve, does the pilot surface integration gaps the evaluation missed. A pilot without predefined success criteria tends to be judged only by whether it "felt fine," which doesn't generalize to the full rollout decision.
Trade-offs and pitfalls
The single biggest analytical mistake in these evaluations is comparing the vendor's subscription price directly against a build estimate that only counts initial development time, ignoring the ongoing maintenance a build requires. The second is treating "no lock-in" as an absolute good: a small team may genuinely benefit from accepting some vendor dependency in exchange for never having to think about that component again, if the vendor uses reasonably open interfaces underneath.
Design a multi-tenant analytics platform supporting many customers of varying size, with data isolation, per-tenant cost tracking, and customizable retention. Compare tenancy models (single-tenant vs multi-tenant tables, single vs multi-cluster) and how you'd enforce quotas.
Sample Answer
A multi-tenant analytics platform serving customers of varying size has to answer one question first, before any tenancy-model choice: how much isolation does each tenant actually need, because that answer, not raw scale, drives the right model.
Tenancy models compared
| Shared tables (row-level isolation) | Separate schemas per tenant | Separate clusters/databases per tenant | |
|---|---|---|---|
| Isolation strength | Weakest: relies entirely on correct row-level filtering everywhere | Stronger: a schema-level bug can't leak data across tenants as easily | Strongest: physical separation |
| Cost efficiency | Best: shared infrastructure, easy to pool unused capacity across tenants | Moderate: some per-schema overhead, still shares underlying compute | Worst: dedicated infrastructure per tenant, significant idle capacity for small tenants |
| Operational complexity | Lowest: one schema to maintain and migrate | Moderate: migrations must run across many schemas | Highest: many independent environments to patch, monitor, and upgrade |
| Best fit | Large numbers of small, cost-sensitive tenants | Mid-size tenants needing stronger isolation without full dedicated infrastructure | A small number of large, security-sensitive, or regulatory-constrained tenants |
Recommendation for varying tenant sizes
A single tenancy model rarely fits customers of genuinely varying size well; a tiered approach is usually the honest answer. Small, cost-sensitive tenants share tables with strict, tested row-level security. Mid-size tenants that need stronger guarantees (perhaps for their own compliance requirements) get separate schemas. A small number of the largest or most security-sensitive tenants get dedicated infrastructure, justified because their revenue or regulatory requirements can absorb the added cost.
Isolation, cost tracking, and retention
Row-level security policies (enforced at the query engine, not just in application code) are the baseline correctness mechanism for the shared-table tier; a bug here is a real cross-tenant data leak, so this deserves the same rigor as an authentication system. Per-tenant cost tracking requires tagging usage (storage and compute) at the tenant level from day one; retrofitting tenant-level cost attribution onto a platform that wasn't designed to track it is materially harder than building it in from the start. Customizable retention per tenant (some tenants may contractually require longer or shorter retention) needs to be a first-class, per-tenant policy in the storage layer, not a single global setting, or you end up either over-retaining data some tenants require you to delete, or under-retaining data others are contractually owed.
Enforcing quotas
Set per-tenant compute and storage quotas enforced by the platform itself (not by convention or manual monitoring), with alerting before a tenant approaches its limit, so a single noisy tenant's usage spike can't degrade performance for everyone sharing that tier's infrastructure. This "noisy neighbor" problem is the most common operational failure mode of the shared-table tier specifically, and it's the strongest argument for moving a consistently-noisy tenant to a more isolated tier rather than trying to throttle them indefinitely within the shared tier.
Trade-offs and pitfalls
The most common mistake is picking one tenancy model for the whole platform because it's simpler to build and operate, when tenants genuinely differ enough in size and isolation needs that a single model either overspends on small tenants (dedicated infrastructure for everyone) or under-isolates large ones (shared tables for everyone). The second is treating row-level security as "done" once written, without ongoing automated testing that verifies a query genuinely cannot return another tenant's rows, since this is exactly the kind of bug that can regress silently after a seemingly unrelated schema change.
Explain the core differences between batch and streaming architectures for analytics: latency, throughput, complexity, state management, and fault tolerance. For a product that needs both nightly retraining or reporting and near-real-time personalization, when would you combine both approaches?
Sample Answer
Batch processing runs on a schedule, reads a bounded chunk of data (an hour's worth, a day's worth), and produces a result once the job finishes. Streaming processing reads an unbounded, continuous flow of events and produces results incrementally as data arrives. The practical differences follow directly from that distinction.
Core differences
Latency: batch is naturally minutes-to-hours behind real time (however often the job runs); streaming can be seconds behind, sometimes sub-second.
Throughput: batch systems can be tuned for very high aggregate throughput because they process large chunks efficiently in one pass; streaming systems trade some raw throughput for the ability to process continuously.
Complexity: streaming introduces problems batch mostly avoids, out-of-order arrivals, the need to define when a window of time is "done" (watermarking), and the need for durable state that survives a restart. Batch just reruns on the next scheduled window.
State management: batch jobs are largely stateless between runs (each run reads from source, computes, writes out). Streaming jobs often hold running state (a count-so-far, a session-in-progress) that must be checkpointed so a crash doesn't lose it.
Fault tolerance: a failed batch job simply reruns from the same bounded input. A failed streaming job must resume from a checkpoint without either losing events or double-counting them, which is a materially harder engineering problem.
When to combine both
A product that needs nightly retraining or historical reporting alongside near-real-time personalization is describing exactly the situation where a hybrid makes sense: use batch for the large, cost-efficient jobs where a few hours of staleness is fine (full model retraining, historical dashboards, data-quality backfills), and use a streaming path only for the narrow slice of the product that genuinely needs sub-minute freshness (live personalization signals, a real-time counter). Building everything as streaming when only one feature needs it adds operational cost and failure surface for no product benefit; building everything as batch when one feature needs real-time responsiveness means that feature simply won't work.
Worked example
Say the near-real-time need is "show a user's updated recommendation score within 30 seconds of a click." The streaming path only needs to update a small, targeted piece of state (this user's feature vector, or a lightweight score) rather than recomputing the whole model. The nightly batch path retrains the underlying model on the full historical dataset, which the streaming path then just applies. This is a genuinely common hybrid: batch does the expensive, infrequent heavy lifting; streaming does the cheap, frequent update on top of it.
Trade-offs and pitfalls
The most common mistake is choosing streaming everywhere because it sounds more modern, without asking whether the product actually needs sub-minute freshness anywhere. Streaming systems are harder to operate, harder to test (an out-of-order event or a late arrival is a real production case, not an edge case), and more expensive to run continuously than a batch job that only spins up compute once a day. The reverse mistake, building a hybrid where the "streaming" half quietly polls every few minutes instead of processing continuously, is a legitimate design if the freshness requirement tolerates it, and it's simpler to build and operate; call it what it is (frequent micro-batch) rather than "streaming."
Unlock Full Question Bank
Get access to all 35 Data Platform Architecture and Technology Selection interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.