Design an Elastic Query Engine
Two teams share one warehouse; the finance team kicks off a quarter-close report that scans a year of data and runs for twenty minutes. At the same moment the product team has three hundred dashboards auto-refreshing every few seconds. On a classic shared-nothing warehouse, where the data is partitioned across the same boxes that run the queries, these two workloads fight. The big report saturates CPU and the dashboards crawl; size the cluster for the dashboards and the report never finishes. Whoever shouts loudest gets the machines. This is the contention the design exists to dissolve, by making compute something you add for one workload without touching another, and by making the data something you never scale at all.
Stated plainly, "design a query engine" is enormous, so cut it to the spine: compute scales independently of storage. In a traditional MPP warehouse the table is sharded onto the nodes' local disks. To add a node you reshuffle data, and to run two workloads you either share the nodes or copy the whole dataset. Snowflake's answer, and the answer this round is looking for, is to stop coupling them. Put the data once in cheap object storage as the single source of truth, and let any number of independent compute clusters read it. Storage becomes a shared, durable substrate, and compute becomes disposable, elastic, and per-workload.
- 1 diagram
- 5 sections
- about 45 min
Premium lessonSnowflake interview guide
These took digging.
What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.
100 companies. Checked every month.
Unlock all 100 companies$49 a year · less than $1 a week · Cancel anytime
Snowflake interview guideKnow what Snowflake asks before you walk in.
10 coding · 5 system design · 18 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.