System Design: Designing a Trending Feature

Question

Design the backend system for a top N trending topics feature.

Background

Similar to previous system design questions, this question is ambiguous and open-ended. It also involves streaming data, which is a nice tie-in with the previous question.

Solution Approach

We’ll follow the same approach as we did for the previous question:

  • Define system requirements:

    Before we begin any design, we’ll spend a few minutes agreeing on the one to two primary use cases you’ll need to cover.

  • System breakdown:

    We’ll then diagram the key individual components of the system needed to address the one to two primary use cases.

  • Dataflow discussion:

    We’ll discuss the necessary data points the system will need to collect and how they flow through the system.

  • Scaling the design:

    We’ll talk about design choices and trade-offs to ensure that the system scales.

  • Capacity modeling:

    We’ll estimate the request volume and data volume the system will need to handle for a given time period.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.