perf: batch access-log writes instead of goroutine+insert per request #91
Reference in New Issue
Block a user
Delete Branch "benvin/batch-access-log"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #76
Why
Every proxied request spawned a goroutine running a 5s-timeout single-row INSERT. Under load this is unbounded goroutines and connection-pool pressure.
Changes
database.AccessLogEntry+InsertAccessLogBatch(bulkCOPY).logAccessis now a non-blocking channel send (drops on full buffer), so the request path never blocks on the DB. Best-effort telemetry: a small tail may be lost on abrupt shutdown.Validation
make e2epasses.