Skip to content

lif0/trippers_network_system_design

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trippers Network - System Design(ru | eng)

Trippers.net - a social network for travelers

Functional Requirements

  • Posting travel posts with photos, a brief description, and geotagging to specific travel destinations;
  • Rating and commenting on posts by other travelers;
  • Following other travelers to track their activity;
  • Searching for popular travel destinations and viewing posts from these locations;
  • Viewing the feed of other travelers.

Non-Functional Requirements

  • DAU 10,000,000
  • Availability: 99.9% (4h 23m) per year
  • Usage location - worldwide
  • Seasonality: tourism is twice as active in summer
  • Posts are stored - permanently
  • Number of subscriptions/followers - unlimited
  • One post - one photo
  • Post:
      - Photo: 1mb
      - Description: 200 characters (utf-8)
      - Location: Location ID
      - Number of reactions: 4 bytes
  • Location: Latitude + Longitude + Radius
  • Comment: 140 characters (utf-8)
  • Reaction: Reaction (1 byte) + post ID (16 bytes)
  • Feed loading time - no more than 5 seconds
  • User feed load: up to 20 posts
  • Popular locations load: up to 10 locations
  • Posts from popular locations load: up to 20 posts
  • Comments from posts load: up to 20 comments
  • User views feed 5 times a day
  • User uploads 1 post every 5 days
  • User reads comments only on one post per day
  • User leaves 1 comment per day
  • User reacts to 3 posts per day

Basic calculations

  • Post:
      - RPS(write): DAU * (1/5) / 86400 = ~23rps
      - RPS(read): DAU * 5 / 86400 = ~580rps

      - Traffic(text write): 25 * ( 200(description) * ~2(utf8) + 4(locationID)) = ~10kb/s
      - Traffic(text read): 580 * (200 * ~2(utf8) + 4(locationID) + 4(number of reactions)) = ~231kb/s

      - Traffic(media write): 25 * 1mb = ~25mb/s
      - Traffic(media read): 580 * 1mb = ~580mb/s
  • Comments:
      - RPS(write): DAU * 1 / 86400 = ~115rps
      - RPS(read): DAU * 1 / 86400 = ~115rps

      - Traffic(write): 115 * 1 *(140 * ~2(utf8)) = ~31kb/s
      - Traffic(read): 115 * 20 * (140 * ~2(utf8)) = ~628kb/s
  • Reactions:
      - RPS(write): DAU * 3 / 86400 = ~347rps

      - Traffic(write): 347 * 16(post ID) = ~5.4kb/s

Concurrent Connections Calculation

  • Connections: DAU * 0.1 = ~1 000 000

About

A social network for trippers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages