其他分享
首页 > 其他分享> > TinyURL - System Design

TinyURL - System Design

作者:互联网

CREATED 2021/09/15 22:15 

Basic requirements

1. URL shortening: given a long url, return a short url

2. URL redirecting: given a short url, redirect to the original long url

3. High availability, scalability and fault tolerance

 

API

POST api/v1/data/shorten {longURL} -> {shortURL}

GET api/v1/getUrl {shortURL} -> {Return longURL for HTTP redirection} 301(permanetly and the browser caches the response) 302(temporarily)

 

Store

hash table <shortURL, longURL>

 

标签:given,url,longURL,System,long,URL,TinyURL,api,Design
来源: https://www.cnblogs.com/wangby511/p/15293065.html