Requirements


Functional Requirements:


  • Create a short URL for a given long URL.
  • Return the long URL associated with a given short URL.
  • how many request will be sent to sever(load)
  • base load need see how unique short url we need create and what will be time line
  • Each long URL maps to a short code.
  • Short code must be unique.
  • Generation should be fast.



Non-Functional Requirements:


  • List the key non-functional requirements (eg low latency, scalability, reliability, etc.)...
  • how to do load balancing
  • how do we scala the pod in case heavy or low load
  • how have highy availability
  • secuity
  • Low Latency
  • High Throughput


API Design

post /api/v1/url

create short url

json

{

longurl : "https://test.com/product/23143"

expire date: 30-6-2026

}


respose

{

short url: "https:/sho.rt/abcd"

expire date: 30-6-2026

}

get https:/sho.rt/abcd

respose

https://test.com/product/23143


High-Level Design






Detailed Component Design

Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.