POST /shorten
GET /url/shorturl (Id)
DELETE /Url/Id
UPDATE (url/Id)
GET GetAllURLs()
GET Url/Redirect/shorturl
Load Balancer: Use load balancer to redirect the services to the appropriate app server.
app server: Handle the appropriate request and serve the user
database: store the mapping between shortened URL and original URL in the database.
Redirect the user to the original URL.
Cache Layer : cache the frequently used URL on the API services. The cache layer exists in api or web server.
The shortening URL will map the shortened URL to the original URL. When the user actually access the shortened URL but the system will fetch the mapped shortened URL to the original URL and will redirect the user to the original URL. The Redirect URL will happen in the front end. The user will type the shortened URL on the browser, the system will call the Shortened URL api services to get the original URL for the shortened URL and send a redirect response to the UI which will redirect the user to original URL.