Tiny URL

  • -10

    preeti_khurana 10 months ago

    Question: How many URLs will we need to handle in the next 5 years? 1
    Hint: Earlier we saw, we would see 100 Million new URLs each month. Assuming same growth rate for next 5 years, total URLs we will need to shorten will be 100 Million * 12 * 5 = 6 Billion.
    Answer: 6 Billion.

    reply
  • -5

    preeti_khurana 10 months ago

    Question: How many URLs will we need to handle in the next 5 years? 1
    Hint: Earlier we saw, we would see 100 Million new URLs each month. Assuming same growth rate for next 5 years, total URLs we will need to shorten will be 100 Million * 12 * 5 = 6 Billion.
    Answer: 6 Billion.

    reply
  • 2

    agniswar_bakshi 10 months ago

    Do the tiny urls need to have an expiry time ?

    reply
  • 2

    gauravraval 10 months ago

    QPS:100 million / month
    = 3 million / day (100m/30)
    = 125000/hour (3m/24)
    = 2083 / minute (125000/60)
    = 34 / second ( 2083/60) (for create)


    Retrieval:
    1billion / month (10write) = 340/second (10write)

    reply
  • 0

    shmallshtrong 10 months ago

    isn't the index size of total 3TB <hash key, URL> data 36GB?

    reply
    • 0

      sumit_007 9 months ago

      I am also having the same doubt. We need to index only hashes (6 bytes each). And total size is 6 billion entries => 36GB data. I guess this can easily fit into a single machine of 72GB RAM.

      reply
    • 0

      Titan99 6 months ago

      If we have QPS of 400 (given in question), and expected QPS to stress server is 50 (say), then we need 400/50 = 8 machines atmax, and we need to save 3TB (For saving actual urls as values) + 36GB (for saving shortened urls as keys) data. So we need 8 machines of (3 TB + 36 GB) / 8 = 380 GB appox each.

      reply
  • 0

    kumar_pratyush 9 months ago

    1157.407407407407

    reply
  • -2

    deepak_singh_603 8 months ago

    Helpful read : https://techinterviewutils.blogspot.in/

    reply
  • 2

    qqldd 4 months ago

    x^62 > 610^9 should be 62^x > 610^9.

    reply
  • 0

    sindhusree_gajjela about 1 month ago

    high availability of the system

    reply
  • 0

    sindhusree_gajjela about 1 month ago

    new urls per month: 100 million

    reply
  • 0

    vedanshu_dahiya 28 days ago

    chzixcz

    reply
  • 0

    anand.ratn 28 days ago

    How to deal with duplicate url ? In this case system will generate a new show url for the same url.

    reply
Click here to jump start your coding interview preparation