Authentication

Basalt Field accepts events over HTTP and gRPC and writes them to local storage before acknowledging anything. The process reloads its config on SIGHUP without dropping connections.

Examples

Reads are served from a memory-mapped view of the log segment, so the page cache does the caching and Basalt Field does not duplicate it. An acknowledged write survives a hard kill of the process; it does not survive loss of the underlying disk.

[server]
listen = "0.0.0.0:8080"
admin  = "127.0.0.1:9100"
data_dir = "/var/lib/basalt"

[limits]
max_batch      = 2048
max_event_bytes = 128_000
flush_interval = "250ms"

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

Defaults

Every event that reaches Basalt Field is assigned a monotonic sequence number as the first thing that happens to it. Each topic maps to an independent log segment, which is what lets recovery happen in parallel after a restart. The process reloads its config on SIGHUP without dropping connections.

Configuration

Reads are served from a memory-mapped view of the log segment, so the page cache does the caching and Basalt Field does not duplicate it. Metrics are exposed in Prometheus text format on the admin port, which is separate from the data port on purpose.

Note. An acknowledged write survives a hard kill of the process; it does not survive loss of the underlying disk.

Configuration

The design goal was a event pipeline that one person can operate and one person can debug. Reads are served from a memory-mapped view of the log segment, so the page cache does the caching and Basalt Field does not duplicate it. Retention is enforced on read as well as on the background pass, so an expired event never becomes visible again after a restart. Logs go to stderr as structured JSON by default, or as plain lines when the output is a terminal.

curl -sS https://static.easytrip.club/v1/topics \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "orders", "retention": "72h"}'