Embedded OLAP: DuckDB, Arrow & Parquet on S3
Query columnar Parquet directly on S3 with DuckDB and Apache Arrow: when one 64-core server beats Spark or Presto on latency, cost, and simplicity.
In this lesson (4 bite-sized sections)
Most "big data" fits on one modern server
Distributed analytics engines such as Spark and Presto were designed when a standard server held 16 GB of RAM and slow spinning disks. Today a single cloud host routinely packs 64 cores, 256 GB of RAM, multi-gigabyte-per-second NVMe scratch storage, and 50 Gbps networking. Telemetry published by major cloud warehouses confirms that over 90 percent of analytical queries scan under 100 GB of data. Booting a 20-node distributed cluster to join 40 GB of Parquet wastes seconds on job scheduling, network shuffles, JVM startup, and idle worker billing when one local vectorized engine finishes faster.
Vectorized DuckDB, Parquet pushdowns, and Apache Arrow
DuckDB is an embedded, in-process columnar OLAP engine built to link directly inside Python, Node, Go, or Rust applications with zero cluster daemon. Three technical choices drive its speed directly over S3 object storage:
- Column pruning and predicate pushdown: Parquet files store column chunks and per-row-group min/max metadata in their footers. Filtering
event_date = '2026-05-01'while summingrevenuefetches only matching row groups and those two columns via HTTP range requests, skipping over 90 percent of bytes before they ever leave S3. - Vectorized execution: operators process CPU-cache-friendly batches of a few thousand column values at once using SIMD instructions, scaling cleanly across 64 cores without row-by-row interpretation overhead.
- Apache Arrow zero-copy handoff: Arrow standardizes an in-memory columnar buffer layout so DuckDB, Polars, PyTorch, and visualization layers pass result sets in RAM without serializing to JSON or copying rows.
| Dimension | Single-Node OLAP (DuckDB + S3) | Distributed Cluster (Spark / Trino) |
|---|---|---|
| Typical working set | Megabytes to ~500 GB | Multi-terabyte to petabyte |
| Startup and coordination | Milliseconds, in-process | Seconds of scheduler and executor warmup |
| Shuffle cost | Local RAM and NVMe spill | Cross-node serialization and network I/O |
| Operational footprint | Stateless container or library | Cluster control plane, autoscaling, tuning |
| Primary ceiling | One host's RAM, NVMe, and concurrency | Minimum cluster overhead and network tax |
Latency, cost, and operational simplicity
Dropping distributed coordination eliminates cluster master failover, straggler executors, shuffle OOM tuning, and idle-cluster bills. An ephemeral container or serverless job starts in milliseconds, streams Parquet or Iceberg tables from S3, spills out-of-core to fast local NVMe if a join exceeds RAM, and exits cleanly. For per-tenant SaaS analytics, CI data checks, or daily ETL pipelines under a few hundred gigabytes, embedded OLAP commonly cuts compute cost 5x to 10x while simplifying debugging to one local process. Even browser dashboards can run DuckDB-WASM against small pre-filtered Parquet slices cached at a CDN edge, eliminating round-trip analytical queries to backend servers altogether.
Where scale-out clusters still win
Single-node OLAP has clear limits. Move to Spark, Trino, BigQuery, or ClickHouse when individual queries routinely join multi-terabyte tables whose intermediate state exceeds one machine's RAM and local NVMe, when hundreds of analysts run heavy concurrent queries needing shared workload queues and cluster-wide caching, or when continuous sub-second streaming ingestion requires distributed partitions. Because DuckDB reads open Parquet and Iceberg tables on S3, graduating to a distributed engine later requires changing compute without migrating storage. In interviews, sizing the actual scanned gigabytes per query before proposing a 30-node Spark cluster shows pragmatic cost awareness rather than resume-driven architecture.
Sources: Why DuckDB · Apache Arrow Columnar Format · Apache Parquet File Format
Apply
Your turn
The task this lesson builds to.
Replace an expensive 12-node Spark cluster that spends $18,000/month running 300 daily customer-isolated reporting jobs (each scanning 5 to 40 GB of S3 Parquet) with a single-node embedded OLAP pipeline, and define the exact threshold that would trigger scaling back out.
Think about
- How do Parquet partitioning, column pruning, and HTTP range requests keep S3 transfer small?
- How does Apache Arrow eliminate serialization overhead if Python or BI consumers read the output?
- What concrete dataset or concurrency signal proves you actually need Trino or Spark again?
Draft your design answer here Save your draft, compare against the model answer, and track progress.
Practice
Make it stick
A second problem on the same idea, so it survives past today.
Compare running DuckDB in-process inside a SaaS backend for customer-facing dashboard queries against routing those dashboards to ClickHouse or Trino when 500 concurrent users slice a shared 3 TB event table.
Think about
- What breaks when 500 concurrent web users hit one embedded DuckDB process against 3 TB of S3 files?
- How do distributed shared caches, admission queues, and pre-sorted indexes help under high concurrency?
- Could embedded DuckDB still serve per-tenant extracts or local BI alongside a shared OLAP engine?
Draft your design answer here Save your draft, compare against the model answer, and track progress.