Explain how the request flows from end to end in your high level design. Also you could draw a sequence diagram using the diagramming tool to enhance your explanation...
Detailed component design
Key Generation Service
base 64 algorithm
64 billion unique ones
Generate keys offline
By generating offline we will miss sequence
we might waste some of them if the server dies down
concurrency issue might be a concern
Single point of failure
key look up - 302 redirect and 404 not found
maximum of 16 characters long key
Caching
Memcache
store full url's with hash
we will store 20% of the cache which will fit into one server
hotspots
LFU
Purging/clean up
expired one's can be removed and new ones inserted
Load balancers
round robin method
what comes in will go out and sequentially processed one at a time
Trade offs/Tech choices
MD5 algorithm
128bit will make 16 characters which will generate trillions of strings
since billions are good enough at this point lets use the basic 64 bit algorithm
load balancer
we can use more intelligent lb to handle the traffic and route it appropriately based on the load