Vercel
On Vercel, Timelake runs inside a Python function, a FastAPI app, and keeps its tables in an S3-compatible bucket. Vercel Blob doesn't work as the store: Timelake can read a warehouse over HTTPS but needs the S3 API to write. This guide uses Tigris and shows how to switch to S3 or R2. Every design below appends to the same table from the same project, so you can start with one and add another later.
| Design | Devices send | Visible to queries after | Fits |
|---|---|---|---|
| HTTP, appended directly | JSON over HTTPS | each request | a few gateways, a few requests a minute |
| Vercel Queues, pushed | a batch of readings per HTTPS request | seconds | gateways that batch readings; bursts and retries |
| Vercel Queues, drained by cron | one reading per HTTPS request | up to a minute | many devices sending single readings |
| Files, appended by cron | CSV, Parquet, or JSON files to the bucket | up to a minute | gateways that upload files with the S3 API |
Which to choose. If gateways batch readings, use Vercel Queues, pushed: the queue absorbs bursts and retries, and each batch becomes one commit. If devices send one reading at a time, use Vercel Queues, drained by cron, which turns a minute of messages into one commit. Use HTTP, appended directly only for a handful of senders, and Files, appended by cron when gateways already upload files. Vercel Queues, drained by cron and Files, appended by cron, the scheduled checks, and hourly maintenance need cron jobs that run every few minutes, which the Pro plan allows. Hobby runs cron jobs at most once a day.
Other designs
- A long-running consumer. Vercel Queues can also be polled from outside Vercel. A container on Fly.io, a VM, or a Kubernetes job can run
poll_and_handleand append every few seconds, holding the table open between appends. - Dashboards. A Next.js app can read the lake with the TypeScript client, which reads warehouses served over HTTPS.
Cost
Each commit sends about 7 writes and 2 reads to the bucket. Tigris prices writes like S3 ($0.005 per 1,000) and reads at $0.0005 per 1,000. At one commit per second that is about $3 a day in requests; at one per minute, as in Vercel Queues, drained by cron and Files, appended by cron, about 5 cents. Storage & configuration breaks the requests down. On Vercel, functions bill for active CPU time and invocations. Queues bill per operation: sending, receiving, acknowledging, and each push, counted per 4 KiB of message, with idempotency keys and max_concurrency pushes at twice the rate. Hobby includes the first million queue operations.