Logs in the Hot Path
Easy · system design problem
Every event the API ingests writes a log line to Elasticsearch synchronously. The log cluster slows to 200 ms — and so does every request.
ingest-api accepts 15,000 events/s and, for audit reasons, writes one log line per event to the logging cluster before answering. At T+20s the logging cluster starts a long reindex and becomes 10× slower for the rest of the day (it keeps enough capacity, just not the speed). Every event must still be logged — but audit logs may arrive minutes late.
Topics
More
Codelays runs in your browser: turn on JavaScript to use it.