PracHub
QuestionsLearningGuidesInterview Prep
|Home/System Design/Figma

Design Trending Collaborative Files

Last updated: Jul 14, 2026

Quick Overview

Design a service that ranks currently trending collaborative files from billions of daily events. Define a trend metric, windowed streaming aggregation, deterministic top-k computation, late-event replay, abuse controls, and permission-safe serving that never exposes private activity.

  • medium
  • Figma
  • System Design
  • Software Engineer

Design Trending Collaborative Files

Company: Figma

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

# Design Trending Collaborative Files Design a service that ranks currently trending collaborative files. Use the following scale and product rules as practice assumptions rather than claims about a particular product. ### Constraints & Assumptions - Events include qualified opens, edits, comments, shares, and unique active users. - Rankings are personalized only by access control and locale; the core trend score is global or workspace-local. - The list refreshes within five minutes and supports hourly, daily, and weekly windows. - Billions of raw events arrive per day. - Private file activity must never reveal a file to an unauthorized user. ### Clarifying Questions to Ask - What behavior should "trending" reward instead of merely "popular"? - Is the ranking global, per workspace, per locale, or per user? - How fresh and stable should the list be? - How should bots, repeated refreshes, deleted files, and newly created files be treated? ### Part 1: Metric and Contract Define a trend score, windows, eligibility, tie-breaking, and the read API. Explain how you would validate the metric before launch. #### Hints - Separate recent acceleration from lifetime popularity. #### What This Part Should Cover - Measurable product objective - Deterministic ranking semantics - Privacy and eligibility ### Part 2: Streaming Aggregation and Ranking Design ingestion, deduplication, windowed aggregation, top-k computation, storage, and backfill. #### Hints - Exact global sorting of every file on every event is unlikely to be necessary. #### What This Part Should Cover - Scalable event and window model - Candidate reduction - Late-event and replay strategy ### Part 3: Abuse, Reliability, and Serving Handle event spikes, hot files, manipulation, permission changes, stale data, and observability. #### Hints - A ranking can be available while a particular result is no longer eligible. #### What This Part Should Cover - Defense in depth against gaming - Fail-safe serving behavior - Quality and pipeline monitoring ### What a Strong Answer Covers - A trend definition tied to a product goal - Windowed streaming architecture with deterministic replay - Efficient top-k computation and permission-safe serving - Abuse controls, backfill, degradation, and online/offline validation ### Follow-up Questions - How would you personalize trends without creating a per-user stream job? - How would you explain why a file is trending? - How would you prevent a single huge workspace from dominating a global list? - How would you change the design for second-level freshness?

Quick Answer: Design a service that ranks currently trending collaborative files from billions of daily events. Define a trend metric, windowed streaming aggregation, deterministic top-k computation, late-event replay, abuse controls, and permission-safe serving that never exposes private activity.

Related Interview Questions

  • Design Comments for a Collaborative Whiteboard - Figma (medium)
  • Design Real-Time Collaborative Comments - Figma (medium)
  • Design an Async Job Scheduler - Figma (medium)
  • Design and operate a monolith on Kubernetes - Figma (hard)
|Home/System Design/Figma

Design Trending Collaborative Files

Figma logo
Figma
Jul 1, 2026, 12:00 AM
mediumSoftware EngineerTechnical ScreenSystem Design
5
0

Design Trending Collaborative Files

Design a service that ranks currently trending collaborative files. Use the following scale and product rules as practice assumptions rather than claims about a particular product.

Constraints & Assumptions

  • Events include qualified opens, edits, comments, shares, and unique active users.
  • Rankings are personalized only by access control and locale; the core trend score is global or workspace-local.
  • The list refreshes within five minutes and supports hourly, daily, and weekly windows.
  • Billions of raw events arrive per day.
  • Private file activity must never reveal a file to an unauthorized user.

Clarifying Questions to Ask Guidance

  • What behavior should "trending" reward instead of merely "popular"?
  • Is the ranking global, per workspace, per locale, or per user?
  • How fresh and stable should the list be?
  • How should bots, repeated refreshes, deleted files, and newly created files be treated?

Part 1: Metric and Contract

Define a trend score, windows, eligibility, tie-breaking, and the read API. Explain how you would validate the metric before launch.

Hints

  • Separate recent acceleration from lifetime popularity.

What This Part Should Cover Guidance

  • Measurable product objective
  • Deterministic ranking semantics
  • Privacy and eligibility

Part 2: Streaming Aggregation and Ranking

Design ingestion, deduplication, windowed aggregation, top-k computation, storage, and backfill.

Hints

  • Exact global sorting of every file on every event is unlikely to be necessary.

What This Part Should Cover Guidance

  • Scalable event and window model
  • Candidate reduction
  • Late-event and replay strategy

Part 3: Abuse, Reliability, and Serving

Handle event spikes, hot files, manipulation, permission changes, stale data, and observability.

Hints

  • A ranking can be available while a particular result is no longer eligible.

What This Part Should Cover Guidance

  • Defense in depth against gaming
  • Fail-safe serving behavior
  • Quality and pipeline monitoring

What a Strong Answer Covers Guidance

  • A trend definition tied to a product goal
  • Windowed streaming architecture with deterministic replay
  • Efficient top-k computation and permission-safe serving
  • Abuse controls, backfill, degradation, and online/offline validation

Follow-up Questions Guidance

  • How would you personalize trends without creating a per-user stream job?
  • How would you explain why a file is trending?
  • How would you prevent a single huge workspace from dominating a global list?
  • How would you change the design for second-level freshness?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Figma•More Software Engineer•Figma Software Engineer•Figma System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.