Skip to content
Tutorials Center
My learning

Topics

Lesson 5 of 38 ยท Architecture

The Three-Layer Architecture

Understand Snowflake's three layers: database storage, virtual warehouse compute and cloud services. See how a query flows through them and why they scale independently.

Snowflake's speed and flexibility come from one design decision: it is built as three independent layers that communicate over the network. If you understand them, features that look unrelated, such as pausing a warehouse, zero-copy clones and data sharing, suddenly make sense as consequences of the same design.

The layers

flowchart TB
  CS["Cloud services layer<br/>auth, metadata, optimizer, transactions"]
  W1["Virtual warehouse A<br/>(finance)"]
  W2["Virtual warehouse B<br/>(data science)"]
  W3["Virtual warehouse C<br/>(loading)"]
  ST["Database storage layer<br/>micro-partitions in cloud object storage"]
  CS --> W1
  CS --> W2
  CS --> W3
  W1 --> ST
  W2 --> ST
  W3 --> ST

Several independent warehouses read and write one shared storage layer. Cloud services coordinates everything.

Three layers

Cloud services The brain
Virtual warehouses The muscle
Storage The memory

Each layer scales and fails independently.

1 / 2

1. Database storage

When you load data, Snowflake reorganizes it into a compressed, columnar format and stores it in cloud object storage (S3, Azure Blob or Google Cloud Storage, depending on your account). You never see files or paths. The data is split into micro-partitions, immutable chunks of roughly 50-500 MB of uncompressed data (Micro-partitions and Columnar Storage). You pay for the compressed size.

Because the files never change in place, many things become simple: concurrent readers never block, an old version can still be read (Time Travel), and a clone is just a second set of pointers.

2. Compute: virtual warehouses

A virtual warehouse is a cluster of compute nodes that executes queries and loads. It has a t-shirt size (XS, S, M, L ... up to 6XL), can start in a second or two, and can be suspended and resumed. Warehouses do not store your data permanently; they only keep a temporary cache on local disk. Each query runs on exactly one warehouse, and different warehouses are fully isolated from each other (Virtual Warehouses).

3. Cloud services

The always-on brain: authentication, role-based access control, query parsing and optimization, metadata management, transaction coordination and infrastructure management. It keeps statistics about every micro-partition (min and max values per column, row counts), which lets the optimizer skip partitions without reading them (Cloud Services and Metadata).

Life of a query

Follow SELECT SUM(total) FROM orders WHERE order_date >= '2025-01-01':

  1. Your client connects; cloud services authenticates you and checks your role's privileges.
  2. The optimizer parses the SQL, consults metadata and builds a plan. It sees which micro-partitions can possibly contain 2025 dates.
  3. The query is dispatched to your warehouse. If the warehouse is suspended and auto-resume is on, it starts first.
  4. The warehouse nodes fetch only the needed partitions and only the needed columns from storage, caching them locally.
  5. Nodes compute partial sums in parallel and combine them.
  6. The result returns to you and is also saved in a result cache for 24 hours.

Why separation matters

Capability Why it works
Scale compute without moving data Warehouses are stateless; data is elsewhere
Pause when idle No data lives in the warehouse
Workload isolation Each team uses its own warehouse on the same tables
Zero-copy clone Only metadata pointers are copied
Data sharing across accounts Another account reads your storage through metadata, with no copy
Instant resizing A new, larger warehouse reads the same data

The following read-only statements illustrate isolation: three teams, three warehouses, one set of tables.

SQL
-- Snowflake SQL (read-only)
CREATE WAREHOUSE finance_wh WAREHOUSE_SIZE = 'SMALL'  AUTO_SUSPEND = 60;
CREATE WAREHOUSE science_wh WAREHOUSE_SIZE = 'LARGE'  AUTO_SUSPEND = 120;
CREATE WAREHOUSE load_wh    WAREHOUSE_SIZE = 'MEDIUM' AUTO_SUSPEND = 60;

-- Everyone queries the same table, each on their own compute:
USE WAREHOUSE finance_wh;  SELECT COUNT(*) FROM shop.raw.orders;
USE WAREHOUSE science_wh;  SELECT COUNT(*) FROM shop.raw.orders;

A model you can run: storage separate from compute

SQLite cannot separate layers, but you can model the idea. In the stand-in, one table plays the part of storage, and two different "teams" (two queries) read it independently without interfering:

SQL Stand-in: shared storage, independent readers ยท database: shop

Press Run (or Ctrl + Enter) to see the result here.

SQL Stand-in: a second reader, same data ยท database: shop

Press Run (or Ctrl + Enter) to see the result here.

Failure and availability

Cloud services and storage are replicated across multiple availability zones in the region, so losing one data center does not lose data or availability. Compute is disposable: if a node fails, the warehouse replaces it and reruns the work. You manage none of this yourself.

Architecture is also why cost behaves as it does: storage is cheap and steady, compute is spiky and the thing you actively control. Nearly every cost lesson later in the course is about keeping warehouses small, suspended and well utilized.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. Which layer holds the actual table data?

    Data lives in compressed micro-partitions in cloud object storage. Warehouses only cache pieces of it temporarily.
  2. 2. Two teams run heavy queries on the same table at once. How does Snowflake avoid slowing them down?

    Separate warehouses have separate compute resources but read the same shared storage, so they do not compete for CPU.
  3. 3. Which layer parses and optimizes queries?

    The cloud services layer holds the optimizer, metadata and security services.
  4. 4. Why can you suspend a warehouse without losing data?

    A warehouse is stateless compute. All persistent data is in the storage layer.
  5. 5. What does a zero-copy clone copy?

    Cloning duplicates metadata. Storage is shared until either side changes data.

Summary

  • Snowflake has three layers: storage, virtual-warehouse compute and cloud services.
  • Data is stored once, compressed and columnar; compute reads it on demand.
  • Cloud services plans queries using metadata about micro-partitions.
  • Separation gives isolation, instant resizing, cheap clones and sharing.
  • You control mostly compute: size, count and suspension.

Next: Micro-partitions and Columnar Storage