...

/

Design a Proximity Service / Yelp

Design a Proximity Service / Yelp

Learn how to design proximity service like Yelp.

What is Yelp?

Yelp is a one-stop platform for consumers to discover, connect, and transact with local businesses. With it, users can join a waitlist, make a reservation, schedule an appointment, or purchase goods easily. Yelp also provides information, photos, and reviews about local businesses.

Requirements

Let’s identify the requirements of our system.

Functional requirements

The functional requirements of our systems are below:

  • User accounts: Users will have accounts where they’re able to perform different functionalities like log in, log out, add, delete, and update places’ information.

    Note: There can be two types of users: business owners who can add their places on the platform and other users who can search, view, and give a rating to a place.

  • Search: The users should be able to search for nearby places or places of interest based on their GPS location (longitude, latitude) and/or the name of a place.

  • Feedback: The users should be able to add a review about a place. The review can consist of images, text, and a rating.

Press + to interact
Functional requirements
Functional requirements

Resource estimation

Let’s assume that we have:

  • A total of 178 million unique users.
  • 60 million daily active users.
  • 500 million places.

Number of servers estimation

We need to handle concurrent requests coming from 60 million daily active users. We assume requests per second (RPS) of 8,000.

Number of daily active usersRPS of a server=60 million8000=7500 servers \frac{Number\ of\ daily\ active\ users}{RPS\ of\ a\ server} = \frac{60\ million}{8000} = 7500\ servers\

Storage estimation

Let’s calculate the storage we need for our data. Let’s make the following assumptions:

  • We have a total of 500 million places. For each place, we need 1,296 Bytes of storage.

  • We have one photo attached to each place, so we have 500 million photos. For each photo, we need 280 Bytes of storage. Here, we consider the row size of the photo entity in the table, which contains a link to the actual photo in the blob store.

  • At least 1 million reviews of different places are added daily. For each review, we need 537 Bytes of storage.

  • We have a total of 178 million users. For each user, we need 264 Bytes of storage.

The total storage we will need is 835 GB approx835 \ GB \ approx ...

Access this course and 1400+ top-rated courses and projects.