A security incident needs logs from 6 months ago that were deleted after 30 days. How do you avoid this next time?
BeginnerScenarioLogging Pipelines
Answer
Situation read → Retention was set by cost, not by investigation or compliance needs.
What I'd do →
- Agree retention with security and legal: e.g. 30 days hot, 1 year cold archive for security-relevant logs.
- Archive raw logs to S3 with lifecycle rules (Standard → Glacier), alongside hot storage.
- Document how to restore or query archives (Athena, rehydrating into a temporary index).
- Test the restore process once a quarter.
Why → Archival storage is cheap; missing evidence is expensive.
Interview tip → Retention is a business decision; engineers implement it, not choose it alone.
More on Logging Pipelines
Developers SSH into servers and `grep` log files to debug. You are asked to centralise logging. Where do you start?BeginnerYour app writes free-text logs like `User 42 paid 19.99 in 340ms`. Why push for structured logging, and how?BeginnerLoki ingestion is failing with `stream limit exceeded` and the ingester memory is exploding. What happened?IntermediateFluent Bit pods on busy nodes are dropping logs during traffic spikes. How do you make the pipeline lossless?IntermediateThe Elasticsearch cluster for logs goes red every Monday after the weekend batch jobs. How do you stabilise it?AdvancedFinance says the log bill doubled in a quarter. How do you cut it without losing debugging ability?Intermediate