Problem Statement: Why Ad-Hoc Logging Fails at Scale
Frames the problem as a governance and engineering challenge, not merely a formatting preference.
Problem statement
Design a secure logging standard that every microservice in a large distributed platform must adopt. The standard defines a unified JSON schema, mandates automatic PII redaction before logs leave the application process, injects correlation IDs for end-to-end request tracing, and produces output that SIEM tools can ingest without per-source parsers. The platform ships enforcement libraries so compliance is the default path, not a code-review burden.
This is not a "pick a log format" exercise. A company with 500+ microservices, dozens of programming languages, and hundreds of engineers shipping daily cannot rely on convention documents. Without enforced structure, three failure modes compound: security teams cannot correlate incidents across service boundaries, compliance auditors find raw personal data in log stores, and on-call engineers waste hours grepping inconsistent field names.
Why the problem is distinctive
A single service can adopt structured logging in an afternoon. A platform-wide standard must solve coordination problems that individual teams cannot: schema versioning across hundreds of deploy pipelines, PII classification that keeps pace with new data fields, correlation ID propagation across synchronous RPC, asynchronous message queues, batch jobs, and serverless functions, and performance budgets that prevent logging from becoming a latency tax.
The problem requires unified schema with standard fields, automatic PII masking, correlation ID injection, enforcement libraries, compliance with data privacy regulations, scalability for massive volume, minimal performance overhead, and SIEM-ready ingestion. The field shapes and multilingual code contract follow the uploaded metadata, while the 30-section pacing is modeled on the gold standard structural reference.
Public operating baseline versus design assumptions
Public evidence establishes that structured logging at scale is operationally real. Netflix engineering blog describes structured JSON logging across thousands of microservice instances with centralized aggregation. Uber's engineering team published details of their centralized logging pipeline processing billions of events daily through Kafka. LinkedIn's InFlow tracing system propagates correlation context across thousands of services. Datadog reports processing trillions of log events monthly across their customer base. These are cited company figures providing context, not requirements for our fictional system.
For capacity planning, this answer explicitly assumes a mature platform with 500 microservices, 12,000 running instances, 2 million log events per second at peak, and 50 TB of raw log volume per day. Unless a number is tied to a citation, it is a stated design assumption, target, budget, or illustrative threshold.
The four architectural planes
- Schema plane: field definitions, types, cardinality, versioning, and validation rules.
- Redaction plane: PII classification, detection rules, masking strategies, and audit trails.
- Correlation plane: trace ID generation, context propagation, span linkage, and cross-boundary transfer.
- Delivery plane: collection agents, buffering, transport, indexing, retention, and SIEM export.
A strong interview answer keeps these planes separate. It allows the delivery plane to degrade without losing redaction guarantees, and it permits schema evolution without silently breaking downstream SIEM parsers.
Key Highlights
- •The standard must be enforced by libraries, not by code review checklists.
- •PII redaction happens before logs leave the application process, not in a downstream filter.
- •Correlation IDs must propagate across RPC, message queues, batch jobs, and serverless boundaries.
- •The architecture has four planes: schema, redaction, correlation, and delivery.
- •A missing log is a reliability problem; a leaked PII log is a regulatory violation.
Section Rescue Kit
Buzzwords to use:
Safe statements:
- "I will separate log formatting from log delivery: the schema is a contract, the pipeline is the enforcement mechanism."
- "Before selecting technologies, let me define which decisions happen inside the application process versus in the collection infrastructure."