Architecture
What a slice is
A slice is your whole application, always on: compute, data, hosting, identity and the rules for its network provisioned together and addressed as one thing. The five pillars aren't five services you wire up: they share one disk and one lifetime, so a Canvas page can call an Atomic function on the same origin, and a function reaches your data without crossing a network.
| Pillar | Who can reach it |
|---|---|
| Canvas | The internet. Your site at your slice's URL, plus the custom domains you point at it. |
| Atomic | The internet, at /api/* on that same URL: https://<you>-<slice>.ondrift.eu/api/items. Your own Canvas site calls it same-origin, and so can anything else you let through the auth gate. |
| Backbone | Your functions only, with one exception: Realtime channels, which browsers reach through Canvas at /realtime/<channel>. Nothing else in Backbone has a public endpoint to secure, because nothing else has one at all. |
| Deed | Your functions only. |
| Edge | Nobody: it is the front door. Every request to your slice meets Edge's rules first, and Edge also decides what your functions may reach. |
Nothing is scaled up or down behind you. A configured slice is never scaled to zero either, so there are no cold starts to design around; the one exception is a free slice, which cools down to zero after 30 days with no request and wakes again on the next one, and gives its disks back after six months. The price of one instance is that replacing it is downtime: a restart, or a platform update, answers 503 for tens of seconds, after up to 10 seconds for calls in flight to finish. Drift rolls slices for platform updates at most three at a time, and which operations replace the instance is written down. The capacity you set is the shape your Driftfile declares, above all the memory each function books, and you pay for what you set rather than have it adjusted for you.
A slice arrives with its network boundary, its TLS, its encryption at rest and its isolation from every other tenant already in place. None of those is a product you pick or a line on the bill, which is the whole of what Drift means by small: fewer parts to buy, not fewer parts.
How a function runs
Atomic runs each call in its own short-lived child process, sealed by a kernel-level filter installed before your code's first instruction. Any attempt to start a second process, re-exec, or attach to another is refused by the kernel rather than caught by a convention. Your function is the only child there will ever be.
That isolation is also what keeps one function's bad day to itself: a handler that panics returns a 500 and the next request is served by a fresh process, with nothing else in the slice disturbed.
Python and Node skip the per-call start: one long-lived server per language holds every deployed function of that language and dispatches by name. Go and Rust are compiled ahead of time, so there is nothing to warm up. Ruby and PHP get a fresh interpreter per call.
The five pillars
Every Drift app is built from five building blocks: Atomic runs your code, Backbone holds your data, Canvas serves your site, Deed answers who your users are, and Edge decides what can reach your slice and what your slice can reach. Use one, use all five. They're designed to click together, so your site can call your functions, your functions can reach your data, your users can be who they say they are, and the network rules for all of it are one block in your Driftfile, with nothing to wire up.
Atomic Compute
Atomic runs your code as functions: small HTTP endpoints you write in the language you already know. You push the code; Atomic builds it, gives it a route, guards it, and keeps it reachable. A function is an ordinary callable in your source plus one function block in your Driftfile naming it. The block's label sets its method and route (function "POST /items"), an auth block inside it sets its gate, and its memory is the memory it books, which is what it is billed at.
| Capability | What it does |
|---|---|
| Functions | HTTP API endpoints, zero boilerplate, multiple languages. |
| Backends | Group related functions into a single logical service. |
| Schedules | Run functions on a cron-style timetable, in addition to their own trigger. |
| Triggers | A Function labelled QUEUE orders (function "QUEUE orders") runs on messages from the queue it names, instead of HTTP requests, and has no URL at all. |
| Auth | A Function with an auth block (api_key = env("ORDERS_KEY")) is gated by that API key; a Function with no auth block is open. |
| Logs & metrics | Structured logs in real time; request counts, durations, error rates. |
Backbone Data
Backbone is the encrypted data plane your functions talk to. It bundles the primitives most apps reach for (documents, files, secrets, queues, cache, coordination, and realtime) behind one simple interface, so you don't assemble (and pay for) five separate services.
| Capability | What it does |
|---|---|
| NoSQL | Document collections with indexing for fast lookups. |
| SQL | Per-slice SQLite databases with schemas and transactions. |
| Blobs | Object storage for files, uploads, and assets. |
| Secrets | Encrypted at rest, fetched per invocation and injected into the functions that name them. |
| Queues | FIFO message queues for background and asynchronous work. |
| Cache | In-memory key/value store for hot reads. |
| Locks | Coordination primitives so work isn't processed twice. |
| Realtime | In-slice pub/sub: live messages fanned out to subscribed clients over WebSocket. |
Canvas Hosting
Canvas hosts your website or frontend. Point it at a folder and it serves your site over HTTPS at your slice's URL. Its best trick: a Canvas site can call its own Atomic functions on the same origin: no CORS to configure, no separate API domain, no tokens to shuttle between two services.
| Capability | What it does |
|---|---|
| Static hosting | One-command deploy of any static site or single-page app. |
| Same-origin APIs | Call your Atomic functions from the browser with no CORS setup. |
| Custom domains | Bring your own hostname; TLS is issued and renewed for you. |
| Automatic TLS | Every site gets a certificate out of the box, with nothing to request. |
Deed Identity
Deed answers who a user is and lets them prove it. It is a peer of Atomic, Backbone, and Canvas, not a primitive under any of them, because identity is a different kind of problem than compute, data, or hosting. It is reached through the SDK exactly like everything else.
| Capability | What it does |
|---|---|
| KeyAuth | Passwordless Ed25519 device-key auth that issues your slice's own session JWT. |
| JWT | General-purpose HS256 sign/verify with your slice's own signing key. |
| Vault | Zero-knowledge, user-scoped recovery store: the slice holds ciphertext it can't read. |
| Link | Multi-device continuity: enroll a second device via a signed attestation. |
| E2EE per-identity app data, following an identity across every enrolled device. |
Edge Network
Edge decides what can reach a slice, and what a slice can reach. It is not a primitive you call through the SDK: every rule about the network, in both directions, is declared in the edge block of your Driftfile, and Drift enforces it itself instead of leaving it to your code.
| Capability | What it does |
|---|---|
| Hostnames and domains | The names a slice answers on: its default <you>-<slice>.ondrift.eu, your verified custom domains, and hosts another slice of yours fronts. |
| IP allowlist | Only the address ranges you list reach the slice at all. |
| Rate limiting | One requests-per-minute budget for the whole slice. |
| Site gate | A username and password in front of your Canvas site, checked by the slice's own Deed. |
| Egress | What a function may dial: any public host, or only the hosts you name. |
| Links | A function calls another slice of yours without leaving Drift. |
How a request reaches your slice
Every request aimed at a Drift-hosted app, whatever pillar it is headed for, meets Edge's rules before your slice sees it. That is what makes the pillars above reachable at a single URL in the first place. The rules run in a fixed order, and each one runs before anything behind it is spent on the request. The way in has the whole order, with the answer each rule gives; in short:
Resolving the host. Edge reads the request's Host header. <you>-<slice>.ondrift.eu resolves straight from that pattern, and a custom domain you have added and verified resolves to the same slice. A host nothing owns gets a plain 404 before anything downstream is asked to do anything.
The allowlist and the rate limit. If you list address ranges, a client outside all of them is refused with 403. Every request that gets further spends from one requests-per-minute budget for the whole slice: a page load through Canvas and a call to /api/items draw from the same count. Past it, Edge answers 429 itself and your slice is never invoked. Limits and alerts has what a caller sees at every ceiling, not just this one.
The Canvas gate. The site_auth block of edge in your Driftfile puts an HTTP Basic-auth challenge on your Canvas site, on Canvas paths only. /api/* and /trigger/… already carry their own credential in the same Authorization header, so gating them here would mean fighting your own app for it. The check runs after the rate limit, so a guess at the password costs the guesser their own budget rather than yours.
Reaching Atomic or Canvas. Once a request clears all of that, /api/* and /trigger/… reach Atomic and everything else reaches Canvas, the same split Canvas's own routing table describes. What your function or your static file receives looks like an ordinary request arriving directly. Nothing about the hop in front of it is visible from inside your slice.
WebSocket upgrades. A request asking to upgrade, the one you will meet directly being a Realtime subscription at /realtime/<channel>, is not proxied like an ordinary call. Edge opens the connection to the backend, completes the handshake, and then copies bytes in both directions for as long as the socket stays open, which is what lets a subscription outlive any single request's own timeout.
Leaving Drift
What you build is yours to take. The CLI, the SDKs and the Driftfile format are public, and a slice's snapshot is a portable archive of your original source, secrets, documents, blobs, queues and sites. Your code comes back with every Drift-generated wrapper stripped out, and the only Drift files are two manifests beside the tree rather than in it.
That matters whether or not you ever leave: it is what makes leaving cheap, and a platform you can leave is one that has to keep earning you.