~ knotless Search/
↑↓ move↵ open⇧↵ all results

zat.dev/zlay

atproto relay in zig · mirror of https://tangled.org/zat.dev/zlay

0
0
31 lines · 2.7 KB Raw History

configuration

variabledefaultdescription
RELAY_PORT3000firehose + API port
RELAY_METRICS_PORT3001prometheus metrics port
RELAY_UPSTREAMbsky.networkbootstrap relay for initial host list (set to "" or "none" to disable)
RELAY_DATA_DIRdata/eventsevent log storage
RELAY_RETENTION_HOURS72replay window on disk. size the replay window from measured disk growth; a short window reduces storage requirements
RELAY_MAX_EVENTS_GB100byte cap on the event dir (GiB), enforced every GC tick. overflow backstop; the effective replay window can be shorter when this cap is reached
COLLECTION_INDEX_DIRdata/collection-indexcollection index path
DATABASE_URL—PostgreSQL connection string
RELAY_ADMIN_PASSWORD—bearer token for admin endpoints
RELAY_INGEST_STALL_ENABLED1/_healthz returns 503 on a process-wide ingest stall; 0 disables. runtime-settable via /admin/ingest-stall
RELAY_INGEST_STALL_THRESHOLD_FPS50ingest rate below which the process counts as stalled
RELAY_INGEST_STALL_WINDOW_SEC900how long ingest must stay below the threshold before /_healthz flips
RELAY_INGEST_STALL_STARTUP_GRACE_SEC900no stall verdict this long after start (cold-start spawn + backfill)
RELAY_WS_PING_ENABLED1keepalive-ping upstream connections to detect half-open TCP; 0 disables. runtime-settable via /admin/ws-ping
RELAY_WS_PING_INTERVAL_SEC30ping a connection after this much silence
RELAY_WS_PING_MAX_FAILURES4reconnect after this many consecutive unanswered pings
RESOLVER_THREADS4background DID resolution threads
FRAME_WORKERS16frame processing pool worker count
FRAME_QUEUE_CAPACITY4096max queued frames before backpressure
VALIDATOR_CACHE_SIZE250000max cached signing keys before eviction

see docs/operations/deployment.md for production deployment and docs/operations/backfill.md for collection index backfill.

The collection index in this source uses zkv. The relay refuses to open a RocksDB directory: use a distinct path and rebuild the index. PostgreSQL and event-log storage remain separate. ZKV_TABLE_ENCODING=legacy is the default; grouped is opt-in. See src/main.zig for profile and replay switches. Configuration defaults are source defaults, not a statement of the currently deployed production configuration.

RELAY_INDEX_PROFILE=default uses the default owner policy. bounded enables the tested bounded maintenance and page-worker policy; the live paired results used this explicit setting. Neither profile selects grouped encoding automatically.