Define the APIs expected from the system. This is your chance to analyze and define the read and write paths so that you can come up with the high-level design...
post some-domain/longUrl/{longUrl} return shortUrl
get some-domain/{shortUrl} redirect longUrl
Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.
post request comes to server with long url and server first checks in the db if that url is already present in the db or not. If present it returns the shortUrl token. If not it hashes the long url maybe using md5 or base62 encoding and generates a key or token and stores it in db and then returns this token to client
get request comes to server with short url from which server extracts the token and then searches the long url using it first in cache. If cache hits then it returns back the long url. If cache misses it checks in the db. If it's not even there it returns 404. If its there then it caches it and returns the token as short url.
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.