This article details Pinterest's architectural overhaul of its real-time abuse detection platform, Guardian, from a monolithic V1 to a modular V2. The rebuild focused on achieving greater scalability, reliability, maintainability, and compliance by decoupling components and leveraging modern data infrastructure like StarRocks and FlinkSQL. Key system design decisions included stream splitting, specialized execution engines, and a unified query-to-action workflow.
Read original on Pinterest EngineeringPinterest's Guardian platform is a critical system for real-time abuse detection, encompassing spam, fraud, account takeover, and unsafe content enforcement. It allows subject matter experts to analyze event streams, identify patterns, and operationalize findings into policies and workflows. While Guardian V1 excelled at enabling a fast feedback loop from investigation to action, its monolithic architecture faced significant challenges at Pinterest's scale, including issues with scalability, reliability, governance risks due to custom data infrastructure, and high maintenance costs. These limitations necessitated a complete rebuild.
Guardian V2 transitions from a monolithic, in-house system to a modular platform built on Pinterest's modern data infrastructure. This architectural shift decouples real-time analytics, continuous signal generation, action evaluation, and historical replay into distinct paths, each optimized for its specific scaling and operational requirements. The core design principles were to preserve the speed of the original workflow while dramatically improving scalability, reliability, maintainability, and compliance.
Learning Point: The Power of Data Plane Optimization
Pinterest's experience with Guardian V2 highlights that system scalability isn't just about faster backend engines. Reshaping the data plane through techniques like stream splitting and pruning can drastically reduce the complexity and volume of data processed by downstream systems, leading to more efficient resource utilization and easier scaling. This shifts complexity from application logic into shared infrastructure.