1, Shortening the URL length
2, Shorten URL still direct to the same as the original one
1, Server ability to take large number of URL and make the shortening function.
1, Around 100 usage per mins
1, Post api/shorten/{url} to shorten the url
2, Get api/url/{url} to get the original url from the db
It should be simple,
we will use non-sql database, such as Mongodb, since I believe there is not complicated query needed
key should be url
{
url,
encoded_url,
}
client -> load balancers -> server -> message queue -> database
client -> load balancers -> server -> message queue -> database
So the client send an Api call to shorten the url, and the load balancer will direct the url to its server, and then since it will be huge number of request, we use a message queue to do the url to database process