Design a Petabyte-Scale Log Ingestion Pipeline Into BigQuery

Last updated: November 29, 2026

Quick Overview

Design a pipeline that collects application and request logs from hundreds of thousands of servers across Google Cloud regions and makes them queryable in BigQuery within a minute, with exactly-once rows.

Google
System Design
Data Engineer
Google
November 29, 2026
Data Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design a pipeline that collects application and request logs from hundreds of thousands of servers across Google Cloud regions and makes them queryable in BigQuery within a minute, with exactly-once rows.

A hard Google Cloud data infrastructure question. The interviewer checks buffering and backpressure, exactly-once semantics end to end, schema evolution, partitioning for cost, and what happens during regional or downstream outages.

What the Interviewer Expects
  • Design local agents with disk buffering and batching
  • Use a durable regional log as the decoupling layer
  • Achieve effectively exactly-once with dedupe keys or transactional writes
  • Partition and cluster tables to control query cost
  • Handle schema changes without dropping data
  • Plan for backfill and late data
Key Topics to Cover
log agents
backpressure
exactly-once
partitioning
schema evolution
dead letter queues
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How would you route PII fields to a restricted table?
  • What happens when BigQuery streaming quota is exhausted for an hour?
  • How do you handle logs arriving three days late?
  • How would you sample debug logs without losing error logs?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements
  • Sources: 500k hosts emitting structured logs; total ~20 GB/s at peak, ~1.5 PB/day.
  • Freshness: queryable within 60 s. Retention: 30 days hot, then archived.
  • Correctness: no loss, no duplicate row...
High-Level Design
  1. Host agent tails files, parses to structured records, attaches (host_id, file_inode, offset) as a unique record id, batches, compresses, and ships to a regional ingest endpoint. It keeps a di...

Submit Your Answer
Markdown supported