Client libraries

Every artifact that reaches Quartz Line is assigned a monotonic sequence number as the first thing that happens to it. Upgrades are in place: stop, replace the binary, start. The on-disk format is forward compatible within a major version.

Configuration

Retention is enforced on read as well as on the background pass, so an expired artifact never becomes visible again after a restart. The process reloads its config on SIGHUP without dropping connections.

Note. There is no built-in authorization beyond token checks. Put it behind something that does policy properly.

Limits

Reads are served from a memory-mapped view of the blob, so the page cache does the caching and Quartz Line does not duplicate it. Duplicate delivery is possible after a crash. Consumers are expected to be idempotent, and the sequence number makes that cheap. Upgrades are in place: stop, replace the binary, start. The on-disk format is forward compatible within a major version.

{
  "repository": "orders",
  "sequence": 594092,
  "blobs": 9,
  "lag_ms": 8,
  "status": "ok"
}

Overview

Quartz Line accepts artifacts over HTTP and gRPC and writes them to local storage before acknowledging anything. Reads are served from a memory-mapped view of the blob, so the page cache does the caching and Quartz Line does not duplicate it. Upgrades are in place: stop, replace the binary, start. The on-disk format is forward compatible within a major version.

[server]
listen = "0.0.0.0:7070"
admin  = "127.0.0.1:9090"
data_dir = "/var/lib/cachectl"

[limits]
max_batch      = 256
max_artifact_bytes = 128_000
flush_interval = "100ms"

[retention]
default = "24h"
compact_at = 0.6

Behaviour under load

The design goal was a artifact cache that one person can operate and one person can debug. Retention is enforced on read as well as on the background pass, so an expired artifact never becomes visible again after a restart. Upgrades are in place: stop, replace the binary, start. The on-disk format is forward compatible within a major version.

$ cachectl serve --config /etc/cachectl/cachectl.toml
$ cachectl repository create orders --retention 72h
$ cachectl status
  uptime      4d 11h
  repositorys   19
  throughput  19k requests/s