---
title: "Rebuilding Guardian: How Pinterest Upgraded Its Real-Time Abuse Platform to Modern Infrastructure…"
description: "Pinterest rebuilt Guardian, its real-time abuse detection platform, from a monolithic in-house system into a modular V2 that separates interactive analytics, continuous action evaluation and historical replay."
url: "https://swe.quest/articles/rebuilding-guardian-how-pinterest-upgraded-its-real-time-abuse-platform-to-dda792e38f97dd45"
canonical: "https://medium.com/pinterest-engineering/rebuilding-guardian-how-pinterest-upgraded-its-real-time-abuse-platform-to-modern-infrastructure-56e45ee8f471"
source: "Pinterest Engineering"
published: "2026-11-16"
difficulty: "medium"
kind: "Case study"
reading_minutes: 12
tags: ["stream-processing","analytics","threat-detection","system-design","data-pipelines"]
---

# Rebuilding Guardian: How Pinterest Upgraded Its Real-Time Abuse Platform to Modern Infrastructure…

A post on [Pinterest Engineering](https://swe.quest/sources/pinterest.md), published 2026-11-16, 12 min read, Case study. Original: [https://medium.com/pinterest-engineering/rebuilding-guardian-how-pinterest-upgraded-its-real-time-abuse-platform-to-modern-infrastructure-56e45ee8f471](https://medium.com/pinterest-engineering/rebuilding-guardian-how-pinterest-upgraded-its-real-time-abuse-platform-to-modern-infrastructure-56e45ee8f471)

## Summary

Pinterest rebuilt Guardian, its real-time abuse detection platform, from a monolithic in-house system into a modular V2 that separates interactive analytics, continuous action evaluation and historical replay. A thin ANTLR4-based translator keeps a single GSQL V2 interface for users, compiling queries to StarRocks SQL for investigation and to FlinkSQL for async actions. Stream splitting and pruning of enriched events into event-family substreams cut indexed column scale from O(20K) to O(K). StarRocks duplicate-key tables, sort keys and Bloom filter indexes bring some lookups to sub-second latency. Replay runs on the same FlinkSQL execution model over Iceberg datasets, which also moves data into governed storage.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Stream processing](https://swe.quest/tags/stream-processing.md) (Data & databases)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Threat detection](https://swe.quest/tags/threat-detection.md) (Security)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)

## Prerequisites

- stream processing basics ([easy posts on Stream processing](https://swe.quest/tags/stream-processing.md?difficulty=easy))
- SQL ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- OLAP databases ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- Kafka ([easy posts on Queues & messaging](https://swe.quest/tags/messaging.md?difficulty=easy))

## Keywords

Guardian, StarRocks, FlinkSQL, Apache Iceberg, ANTLR4, GSQL, Kafka, Pinterest

## Related posts

- [Fast, Feature Rich and Mutable : ClickHouse Powers Darwinium's Security and Fraud Analytics Use Cases](https://swe.quest/articles/fast-feature-rich-and-mutable-clickhouse-powers-darwinium-s-security-and-fraud-ebcdc43d86516c3d.md): ClickHouse · 2022-07-27 · Easy · 11 min read · Analytics & OLAP, Threat detection, Databases
  Darwinium, a digital risk and fraud platform, chose ClickHouse to back interactive security and fraud analytics over large, wide, long-retention event data.
- [Front-end observability at scale: How OpenReplay captures billions of daily events in real time with ClickHouse](https://swe.quest/articles/front-end-observability-at-scale-how-openreplay-captures-billions-of-daily-b210d948927bb0e9.md): ClickHouse · 2026-10-21 · Easy · 8 min read · Analytics & OLAP, Observability, Data pipelines, PostgreSQL, Scaling
  OpenReplay, a self-hosted session replay and product analytics platform, moved behavioral event storage from Postgres to ClickHouse.
- [Goldsky - A Gold Standard Architecture with ClickHouse and Redpanda](https://swe.quest/articles/goldsky-a-gold-standard-architecture-with-clickhouse-and-redpanda-347e225c0fe7c7a7.md): ClickHouse · 2023-12-20 · Medium · 9 min read · Analytics & OLAP, Stream processing, Queues & messaging, Multi-tenancy, Data pipelines
  Goldsky streams blockchain data to potentially thousands of customer ClickHouse clusters by indexing chains into per-data-type Redpanda topics (Avro, infinite retention via tiered storage), applying per-customer FlinkSQL filters, joins and aggregations in stream at up to 500k events/sec, and delivering results to ClickHouse.
- [How ClickHouse Cloud enabled LaunchDarkly to build and ship features faster](https://swe.quest/articles/how-clickhouse-cloud-enabled-launchdarkly-to-build-and-ship-features-faster-0e4ac03aed14f7e6.md): ClickHouse · 2026-01-22 · Medium · 10 min read · Analytics & OLAP, Data pipelines, Observability, Multi-tenancy, Cloud platforms
  LaunchDarkly replaced Kinesis/Flink/Lambda streaming pipelines and an S3/Parquet/Athena batch warehouse with ClickHouse Cloud.
- [Data Hive: The story of beehiiv’s journey from Postgres to ClickHouse](https://swe.quest/articles/data-hive-the-story-of-beehiiv-s-journey-from-postgres-to-clickhouse-467867cb2bebb87b.md): ClickHouse · 2024-08-21 · Easy · 6 min read · Analytics & OLAP, Databases, PostgreSQL, Stream processing, Queues & messaging
  beehiiv replaced its Postgres-and-Ruby-queue analytics system, which struggled with billions of email events and had multi-hour reporting delays, with a Kafka-fed ClickHouse Cloud pipeline.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
