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.
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."
Design a governance program meant to meaningfully cut recurring bad-data incidents (say, by half) across dozens of autonomous teams, without centralizing everything and killing team agility. What's your operating model (centralized versus federated, or something closer to how a data-mesh migration would frame domain-level responsibility with central guardrails), what technical controls and organizational changes does it actually require (ownership assignment, runbooks, policy-as-code, quality gates), and what would you measure over the following year to know the program is working, not just running?
Sample Answer
The core design choice is a federated operating model with central guardrails, not full centralization: domain teams own their data and remain accountable for its quality, while a small central governance function owns the shared standards, tooling, and the small set of policies that must be consistent everywhere (naming conventions for canonical entities, classification tiers, the schema-contract format, the escalation path for a cross-domain incident). This mirrors how a data-mesh migration frames domain-level responsibility with central guardrails: the mesh doesn't eliminate governance, it moves enforcement out of a central team's backlog and into each domain's own pipeline, backed by shared infrastructure the central team maintains.
Operating model
- Domain teams: own their source tables, their producer contracts, and first-line triage of quality incidents in their own data.
- Central governance function: owns the policy-as-code framework, the catalog, the classification standard, and cross-domain incident coordination. It sets the bar; it does not review every table.
- Federation boundary: a domain team can ship changes freely as long as they pass the shared automated gates; anything that would break a documented cross-domain contract requires the same CI-enforced compatibility check as any producer contract, not a manual sign-off meeting.
Technical controls and organizational changes
- Ownership assignment. Every dataset with downstream consumers gets a named owning team in the catalog, not a person (people leave, teams persist). This is the single highest-leverage change: an unowned incident cannot be triaged.
- Runbooks. Each owning team maintains a runbook for their domain's common failure modes (a stalled ingestion job, a schema-drift alert, a null-rate spike) so on-call response does not depend on institutional memory. Runbooks are checked into the same repo as the pipeline and reviewed on the same cadence as the code.
- Policy-as-code. Classification rules, retention windows, and compatibility rules are expressed as machine-checkable policy (for example, Open Policy Agent rules or a custom linter run in CI) rather than a wiki page, so a violation fails a build instead of being caught in a quarterly audit.
- Quality gates. Automated checks (freshness, null rate, referential integrity, schema compatibility) run on every load and block publication of a failing batch. This is what actually prevents incidents rather than just detecting them faster.
Concrete rollout: ownership plus runbooks as the first program elements, over 12 months, by vertical
Rather than rolling out to "dozens of teams" simultaneously, sequence by business vertical so the program proves itself before it scales. A realistic first-year plan:
- Months 1-3: pick one vertical, for example the CRM (customer relationship management) domain, as the pilot. Assign explicit ownership for every CRM-sourced table with downstream consumers, write the first runbooks for its two or three most common incident types, and stand up the quality gates on ingestion. This is deliberately narrow so the pattern can be validated before it is asked of teams who did not choose it.
- Months 4-6: extend the same ownership-assignment-plus-runbook pattern to a second vertical with materially different risk profile, for example finance data (where compatibility breaks have compliance consequences, not just dashboard noise). This tests whether the guardrails generalize or were accidentally tuned to CRM's shape of problem.
- Months 7-9: roll the same pattern to the remaining domains in waves of a handful of teams at a time, reusing the policy-as-code rules and runbook templates built in the first two verticals rather than writing new tooling per team.
- Months 10-12: the central function shifts from active rollout to maintenance: quarterly policy review, an incident retrospective process, and a self-service onboarding path so a new team can adopt the standard without a central-team engagement.
What to measure to know it's working, not just running
| Metric | Why it matters |
|---|---|
| Incident count by domain, trended monthly | The stated goal (cut recurring incidents by half); trend, not a single snapshot, filters out noise. |
| Mean time to identify an incident's owning team | Falling toward "the catalog answers this instantly" means ownership metadata is actually current, not decaying. |
| Percentage of in-scope tables with an owner, a contract, and passing quality gates | Coverage; a program with great runbooks on 10% of tables isn't working yet. |
| Runbook usage in incident postmortems | If on-call keeps solving the same incident from scratch, the runbook isn't trusted or isn't current. |
| Domain team velocity (release frequency, lead time) before and after adoption | Confirms the federated model didn't quietly recentralize and become a bottleneck, which was the explicit thing to avoid. |
Trade-offs and pitfalls
The biggest risk in this design is the central function drifting into a review bottleneck by accident: every "just this once" manual sign-off makes the next domain team expect the same, and the whole point of policy-as-code is to make the guardrail a build check, not a meeting. The other common failure is measuring activity instead of outcomes (number of runbooks written, number of tables catalogued) without ever checking whether incident counts actually fell; a program can look busy and still not be reducing the thing it was funded to reduce.
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.
An organization has heavy BI reporting, ad-hoc data science, and near-real-time feature needs. Would you standardize on a single lakehouse, or run a warehouse alongside a lake? Propose an architecture (possibly combining both) and describe the data flow, synchronization, and governance implications of your choice.
Sample Answer
When an organization genuinely needs heavy BI, ad-hoc data science, and near-real-time features all on the same data, the honest answer is usually neither a pure warehouse nor a pure lake alone, but a lakehouse serving BI and data science together, plus a narrow, separate low-latency path for the specific real-time feature needs.
Why not standardize on one alone
A pure warehouse struggles with the unstructured or semi-structured data data science often wants, and it usually isn't built for the sub-second, high-throughput reads a real-time feature-serving layer needs. A pure lake without transactional guarantees creates correctness headaches for BI (dashboards need trustworthy, consistent numbers, not "eventually consistent" files) and forces data science to build its own reproducibility discipline from scratch. A lakehouse (an open table format like Iceberg or Delta Lake over lake storage) closes most of that gap for BI and data science on one copy of the data, but it is not, by itself, a low-latency online feature store.
The architecture
Curated lakehouse tables serve both BI (via the warehouse/query-engine layer on top) and data science (direct table access, versioned, ACID-safe [atomicity, consistency, isolation, durability], so an experiment run last month is reproducible today). For the near-real-time feature need specifically, add a narrow streaming path: a stream processor computes the handful of features that genuinely need sub-second freshness and writes them to a low-latency key-value store (the actual online feature-serving layer), separate from the lakehouse. The lakehouse remains the batch/offline source of truth that periodically backfills and reconciles against that online store, so the two never permanently diverge.
Data flow and governance
Raw events land once, in the lakehouse's raw layer. Batch transforms build the curated tables BI and data science both read. A stream processor reads the same raw event stream in parallel (not a copy pulled from the curated layer) to avoid adding batch latency to the real-time path, computes the specific low-latency features, and writes them to the online store. Governance-wise, both paths should derive from the same event schema and the same feature definitions, checked in code, so a BI number and a real-time feature score never quietly diverge on what "active user" or "recent purchase" means.
Trade-offs and pitfalls
The most common mistake is trying to make one system do all three jobs by choosing whichever technology sounds most feature-complete on paper. A lakehouse alone will disappoint the real-time-feature team on latency; a dedicated feature-store product alone will disappoint BI and data science on the breadth of historical, ad-hoc querying they need. The second mistake is letting the batch and streaming paths compute the same business logic independently in two codebases, which reliably drifts apart over time; sharing the feature/metric definitions between the two paths, even if the execution engines differ, is what prevents that.
Unlock Full Question Bank
Get access to all 10 Data Platform Architecture and Technology Selection interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.