Linora

0301. API service: one request pipeline, per-replica caches invalidated by NOTIFY, bounded limits

Status: Accepted (2026-11-27). Builds on 0022, 0023, 0021. Rate limits superseded by 0306: buckets are now global across replicas (local buckets synced through Postgres every 250 ms).

Context

The API must hold p99 < 20 ms at 1k RPS on one instance with minimal memory. It must also stay stateless across replicas: a revoked credential or a removed member must lose access everywhere, immediately. Every route needs the same auth, scope, role, tenant and limit checks, with nothing configured per handler that could be forgotten.

Decision

Alternatives

Consequences