Pinterest is a social bookmarking site where users collect and share photos of their favorite events, interests and hobbies ... more

Decisions 2

James Man

Software Engineer at Pinterest

One of our top priorities at Pinterest is fostering a safe and trustworthy experience for all Pinners. As Pinterest’s user base and ads business grow, the review volume has been increasing exponentially, and more content types require moderation support. To solve greater engineering and operational challenges at scale, we needed a highly-reliable and performant system to detect, report, evaluate, and act on abusive content and users and so we created Pinqueue.

Pinqueue-3.0 serves as a generic platform for content moderation and human labeling. Under the hood, Pinqueue3.0 is a Flask + React app powered by Pinterest’s very own Gestalt UI framework. On the backend, Pinqueue3.0 heavily relies on PinLater, a Pinterest-built reliable asynchronous job execution system, to handle the requests for enqueueing and action-taking. Using PinLater has significantly strengthened Pinqueue3.0’s overall infra with its capability of processing a massive load of events with configurable retry policies.

Hundreds of millions of people around the world use Pinterest to discover and do what they love, and our job is to protect them from abusive and harmful content. We’re committed to providing an inspirational yet safe experience to all Pinners. Solving trust & safety problems is a joint effort requiring expertise across multiple domains. Pinqueue3.0 not only plays a critical role in responsively taking down unsafe content, it also has become an enabler for future ML/automation initiatives by providing high-quality human labels. Going forward, we will continue to improve the review experience, measure review quality and collaborate with our machine learning teams to solve content moderation beyond manual reviews at an even larger scale.

38 648.9K

Ashish Singh

Tech Lead, Big Data Platform at Pinterest

Apache Hive

To provide employees with the critical need of interactive querying, we’ve worked with Presto, an open-source distributed SQL query engine, over the years. Operating Presto at Pinterest’s scale has involved resolving quite a few challenges like, supporting deeply nested and huge thrift schemas, slow/ bad worker detection and remediation, auto-scaling cluster, graceful cluster shutdown and impersonation support for ldap authenticator.

Our infrastructure is built on top of Amazon EC2 and we leverage Amazon S3 for storing our data. This separates compute and storage layers, and allows multiple compute clusters to share the S3 data.

We have hundreds of petabytes of data and tens of thousands of Apache Hive tables. Our Presto clusters are comprised of a fleet of 450 r4.8xl EC2 instances. Presto clusters together have over 100 TBs of memory and 14K vcpu cores. Within Pinterest, we have close to more than 1,000 monthly active users (out of total 1,600+ Pinterest employees) using Presto, who run about 400K queries on these clusters per month.

Each query submitted to Presto cluster is logged to a Kafka topic via Singer. Singer is a logging agent built at Pinterest and we talked about it in a previous post. Each query is logged when it is submitted and when it finishes. When a Presto cluster crashes, we will have query submitted events without corresponding query finished events. These events enable us to capture the effect of cluster crashes over time.

Each Presto cluster at Pinterest has workers on a mix of dedicated AWS EC2 instances and Kubernetes pods. Kubernetes platform provides us with the capability to add and remove workers from a Presto cluster very quickly. The best-case latency on bringing up a new worker on Kubernetes is less than a minute. However, when the Kubernetes cluster itself is out of resources and needs to scale up, it can take up to ten minutes. Some other advantages of deploying on Kubernetes platform is that our Presto deployment becomes agnostic of cloud vendor, instance types, OS, etc.

#BigData #AWS #DataScience #DataEngineering

33 551.1K

Blog Posts 109

Oct 14, 2020 at 9:06PM
by Pinterest Engineering
Oct 8, 2020 at 9:33PM
by Pinterest Engineering
Oct 5, 2020 at 8:40PM
by Pinterest Engineering

Open Source 51

A high-performance, reliable and extensible logging agent for data ingestion.
1 4
XCHammer generates Xcode projects from a Bazel Workspace.
0 12
Pinterest's Open Source Project Template
0 4
A set of React UI components that supports Pinterest’s design language
116 2.5K

Tech Talks 17

by Pong Eksombatchai One of the primary engineering challenges at Pinterest is how to help people discover ideas they want to try, which means serving the right idea to the rig...
by Ekrem Kocaguneli Welcome to Pinterest’s home-sweet-Home Feed. Ekrem starts by giving you the ins and outs of how Pinterest’s highly personalized Home Feed works, then explai...
by Justin Mejorada-Pier & Charlie Gu In this talk, Justin and Charlie run through the challenges they faced while building in-house tools like DataHub (the primary way people r...
by Jenny Liu Learn how we built the web-scale recommender system that powers over 40% of user engagement on Pinterest. Jenny will discuss how the small but mighty team prioriti...

Followers 1494