Storage & configuration
Timelake uses the Rust object_store crate for everything: Iceberg metadata, Parquet data, and query scans. The warehouse URL picks the backend.
| Scheme | Backend | Credentials |
|---|---|---|
local path, file:// | Local filesystem | — |
s3://, s3a:// | Amazon S3 and S3-compatible stores | AWS_* environment variables, plus options |
gs:// | Google Cloud Storage | GOOGLE_* environment variables, plus options |
az://, abfs://, abfss:// | Azure Blob Storage / ADLS | AZURE_* environment variables, plus options |
https://, http:// | Any web server or public bucket (read-only, see below) | — |
memory:// | In-memory (tests) | — |
Options
Options are object_store configuration keys: -o key=value on the CLI, storage_options in Python. For S3, GCS, and Azure, unknown keys are an error; other backends ignore options. Common S3 keys:
| Key | Meaning |
|---|---|
aws_region | Bucket region. |
aws_access_key_id, aws_secret_access_key, aws_session_token | Static credentials (otherwise the environment and instance credentials are used). |
aws_endpoint | Custom endpoint for S3-compatible stores, e.g. http://localhost:9000. |
aws_allow_http | true to allow a plain-HTTP endpoint. |
Timelake’s own options work with every backend:
| Key | Meaning |
|---|---|
timelake_version_lookup | How a table’s first load in a process finds the newest version: list (one LIST of metadata/v…, sent with the head GET) or hint (GET version-hint.text with the head, then a HEAD of the next version). Default list where the store can list by prefix. See trade-offs. |
timelake_freshness_check | How a reader that already has a table version checks for a newer one: head (a HEAD of the next metadata file) or list (a LIST of that exact name). Default head; list on Tigris. list needs S3, GCS, or Azure. |
timelake_warm_connections | How many connections a table’s first load opens ahead of the data reads, with small HEAD requests. Default 0. |
timelake_cache | The block cache: off, memory, or disk (memory and a directory shared by every process on the machine). Default memory for object stores and HTTPS, off for local disk. |
timelake_cache_dir | The disk cache's directory. Default timelake in the OS cache directory (~/Library/Caches, $XDG_CACHE_HOME or ~/.cache, %LOCALAPPDATA%). |
timelake_cache_memory_bytes, timelake_cache_disk_bytes | The caches' budgets. Default 268435456 (256 MiB) and 4294967296 (4 GiB). |
timelake_cache_block_bytes | The block size. Default 1048576 (1 MiB). |
timelake_cache_request_bytes | The largest GET the cache sends: longer runs of missing blocks are split into parts fetched at once. Default 1048576 (1 MiB); 0 for no limit. More, smaller requests finish sooner when each request streams at a limited rate, as on S3 (about 50–90 MiB/s), at the price of more requests. |
timelake_local_root | Write objects under a local directory (see below). |
timelake -w s3://lake/wh -o aws_endpoint=http://localhost:9000 -o aws_allow_http=true lstimelake.Lake("s3://lake/wh", storage_options={
"aws_endpoint": "http://localhost:9000",
"aws_allow_http": "true",
})Read-only HTTPS
An http:// or https:// warehouse (Vercel Blob, a public bucket, a CDN) can be read by the CLI, Python, and the TypeScript client, but not written to. Plain HTTP can't list objects, so tables are found through timelake-tables.json. To publish a warehouse at a URL, build it on local disk with its final URL already in the metadata, then upload the files with their paths unchanged:
timelake -w https://<store>.public.blob.vercel-storage.com/demo \
-o timelake_local_root=./site-files \
import tsbs.readings readings.parquet --time-column time --series-key tags_id
# upload ./site-files/** to the store, keeping pathstimelake_local_root works with any URL: objects are written under the local directory while every path recorded in Iceberg metadata keeps the URL.
Requests and cost
Object stores charge per request as well as per GB. On AWS S3 Standard (us-east-1 and us-east-2, October 2026) a PUT, COPY, POST, or LIST costs $0.005 per 1,000 and a GET or HEAD $0.0004 per 1,000. Tigris charges the same for writes and LISTs and $0.0005 per 1,000 reads; R2 and Wasabi charge differently. Check your store’s price list.
Writing. An append that lands in one partition, without maintenance:
| Request | Count | Why |
|---|---|---|
| PUT | 4 | the data file, its manifest, the manifest list, the last-value index |
| PUT (conditional) | 1 | vN+1.metadata.json: the commit |
| PUT | 2 | the version hint and the head, in the background |
| GET | 2 | the head’s first bytes (so it never moves backwards) and the new file’s footer, in the background |
So about 7 PUTs and 2 GETs: at one append per second, about $3 a day on S3. Each extra partition adds 1 PUT (and 1 GET for its footer); a large file is uploaded in parts. Inline maintenance adds the reads and writes of the files it compacts. With timelake.head-format=none a table has no head: 1 PUT and 2 GETs fewer per commit, and slower first queries.
Storing. S3 Standard storage costs $0.023 per GB-month; an EBS gp3 disk, where a database keeps its data, costs $0.08. In the TimescaleDB comparison the same TSBS IoT data took 413 MB in TimescaleDB’s columnstore and 228 MB of Parquet in Timelake: about 6× less to keep in the bucket, before counting the server the database runs on.
Reading. What a query sends before it reads data:
| Situation | Requests | Round trips |
|---|---|---|
First query on a table in this process, timelake_version_lookup=list (default) | 1 GET (head) + 1 LIST | 1 |
First query, timelake_version_lookup=hint, or plain HTTPS (can’t list) | 2 GETs (head, version hint) + 1 HEAD | 2 |
Later queries, after version-check-interval (1 s) | 1 HEAD (a LIST with timelake_freshness_check=list) | 1, while the query is planned |
Later queries within version-check-interval | none | none |
| Table without a head | + GETs of the metadata, manifest list, and manifests | + 2 |
Then each query reads its data: one GET per run of missing blocks, a few per file, none for footers the head carried, and none for blocks already in the block cache. A dashboard that refreshes one table every 5 seconds sends about 17,000 checks a day plus its data reads: a few cents a day on S3. With version-check-interval = 1m it sends 1,440.
Request options: trade-offs
timelake_version_lookup: list or hint. A first load has to learn the newest version, because the head and the version hint are written after a commit and can be behind.
listsends one LIST ofmetadata/v…together with the head GET. The listing names every committed version, so the head is confirmed or skipped in the same round trip. Cost: a LIST is priced like a PUT on S3, about 12 GETs.hintGETs the version hint with the head, then sends a HEAD for the next version. No LIST, but one more round trip: about 60 ms from a laptop to S3 (firstlatest305 ms instead of 240).- Why
listis the default: a first load happens once per table per process, so the LIST adds a fraction of a cent per thousand processes, while the round trip it saves is on every first query. Choosehintwhen very many short-lived processes each read a table once (serverless functions polling many tables) and request cost matters more than 60 ms.
timelake_freshness_check: head or list. A process that already has a table checks for a newer version on later queries.
headsends a HEAD for the next metadata file. It is the cheapest request on most stores and fast when the answer is “not found” (about 55 ms on S3).listlists that exact name. It costs about 12× a HEAD on S3, but on Tigris a HEAD of a missing key takes about 285 ms and the LIST about 40 ms.- Why the default is per store:
headeverywhere, except Tigris, wherelistis about 245 ms faster on every check. Setheadon Tigris to pay less per check and wait longer.
version-check-interval (a setting of a table or session, not a storage option). How long a reader uses a table version without checking for a newer one.
- Within the interval a query sends no request for the table’s version: that saves one HEAD and its round trip (about 55 ms from a laptop to S3) on each query.
- The price is freshness: a query can miss commits other processes made in the last interval. The process’s own commits are always seen, and writers always check, since a commit is a conditional write.
- Why the default is 1 second: results then lag other writers by at most a second, as they did before the setting existed, and the queries of one dashboard refresh share one check. Raise it for dashboards that refresh often and can be that far behind.
timelake_warm_connections. Opens connections early so data reads don’t wait for TCP and TLS setup.
- Why it is off: measured on S3 and Tigris, it saved at most about 20 ms on first scans and nothing on point queries, and each connection costs a HEAD request. Try it if your client is far from the store.
timelake.head-format=none (a table property, for writers). No head: 1 PUT and 2 GETs fewer per commit, and first queries fall back to the metadata chain (3 round trips instead of 1 for latest).
Block cache
Files a table never changes are cached: data files, manifests, manifest lists, and last-value index files (*.parquet and *.avro, named with a UUID). They are cached in blocks (1 MiB by default): a read takes the blocks it covers from the cache, and fetches the missing ones next to each other in one ranged GET. Reads of the same missing block at the same time share one fetch. What a process writes goes into the cache as it is written, so it reads its own appends without requests.
Nothing that can change is cached: the version hint, the head, listings, and vN.metadata.json. A query still checks for a newer table version as before, so cached blocks never make an answer stale.
- Memory (the default for object stores): the least recently used blocks go when the budget (256 MiB) is reached. Repeat queries in a long-lived process, such as a Python service or a notebook, read their data from memory.
- Disk (
timelake_cache=disk): a directory that every process on the machine shares, so a new CLI or Python process starts with the blocks earlier ones read. Any process deletes the least recently used blocks once the directory passes its budget (4 GiB).
Measured on S3 from an EC2 instance in the same region: TSBS IoT repeat queries took 16 ms instead of 54 (geometric mean) and sent no requests, and 16 clients ran 398 queries per second instead of 288. With the disk cache, a new process's first queries took 71 ms instead of 151. See Performance history.
Lake.cache_stats() in Python and Storage::cache_stats() in Rust count blocks read from memory and disk, blocks fetched, and bytes fetched. The WebAssembly reader and the TypeScript client don't use it: the browser has its own cache.
Conditional writes are required
Commits create the next vN.metadata.json with put-if-absent: on S3 that is If-None-Match: *, which AWS S3 has supported since 2024; GCS and Azure use their own preconditions. A store that ignores the condition would let two concurrent writers both believe they committed. Timelake has been tested on local disk, RustFS, AWS S3, and S3 Express One Zone (correctness only). With an S3-compatible store you haven’t tested, check that a second put-if-absent of the same key fails (add --endpoint-url for the store):
echo probe > probe.txt
aws s3api put-object --bucket my-bucket --key probe.txt --body probe.txt --if-none-match '*' # succeeds
aws s3api put-object --bucket my-bucket --key probe.txt --body probe.txt --if-none-match '*' # must fail: PreconditionFailed
aws s3api delete-object --bucket my-bucket --key probe.txtCreating the same table twice is not a test: create sees the first table before it tries the conditional write.
A probe from one place doesn't show what writers in different regions see. Tigris checks a conditional write against the latest state in one region only on its default global and dual-region buckets (Tigris docs), so writers in two regions could both commit the same version. Create a Tigris lake bucket as single-region or multi-region, or keep every writer in one region.
Environment
| Variable | Meaning |
|---|---|
TIMELAKE_WAREHOUSE | Default warehouse for the CLI. |