← Questions

Design a security monitoring framework

0
GoogleSystem designLast asked May 2026

A system design interview question asked in Google's first round (coding), last asked May 2026. It tests security, monitoring and streaming.

Design a framework that collects security signals from many systems (application and system logs, authentication events, network flow logs, cloud audit trails, endpoint agents), detects suspicious activity, raises alerts and supports investigations. Security teams should be able to add new detections without changing the pipeline.

Requirements

  • Functional: ingest events from many sources in different formats; normalise them to a common schema; run detection rules on the stream (single-event matches, thresholds over time windows, sequences across sources) and as scheduled queries over history; raise alerts with context, de-duplicated and routed to the right team; let analysts search raw and normalised events for an investigation; let teams write, test and deploy rules.
  • Non-functional: millions of events per second at peak; detection latency of seconds to a minute for streaming rules; months of searchable history and longer cold retention; no event lost; the pipeline itself is tamper-resistant and access to it is audited.

Clarifying questions

  • Which sources and volumes, and which detections matter most (account takeover, data exfiltration, privilege escalation)?
  • What latency is needed from event to alert?
  • How long must data be kept and searchable, and are there compliance rules?
  • Who writes detections: a central team, or every product team?
  • Is there an existing SIEM to integrate with or replace?

What a strong answer covers

  • Collection: agents and connectors into a durable log (Kafka-style), partitioned by source, with back-pressure and replay.
  • Normalisation and enrichment: a common event schema, plus lookups for user, asset owner, geo-IP and threat intelligence, applied in the stream.
  • Detection engine: stateless rules on single events, stateful rules with windowed aggregates and joins keyed by user or host, and batch rules over the warehouse for slow patterns. Rules as versioned code or a DSL, tested against recorded data before deployment.
  • Storage tiers: hot index for recent search, columnar warehouse for long-range queries, cheap object storage for raw archives.
  • Alerting: de-duplication and grouping into incidents, severity, routing, suppression of known-benign patterns, and a feedback loop that tracks false-positive rates per rule.
  • Investigation: a timeline per user or host across sources, pivoting between related entities.
  • Security of the system: signed transport, write-once storage for audit logs, strict access control.

Follow-ups

  • A source goes silent. How do you detect that, since missing logs may be an attack?
  • A rule fires 10,000 times an hour. What do you do?
  • How would you add anomaly detection (baselines per user) next to fixed rules?
  • How do you test a new detection before it pages anyone?

Where it's asked

  • Google · First round: coding · Last asked May 202645 min · Coding in a Google Doc, no syntax highlighting or autocomplete · No AI

What it tests

security · monitoring · streaming

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing