Write:
Read:
Storage:
userID (PK)
shortURL
longURL
Description:
userID: unique ID can be generated by unique ID generator.
shortURL: 7 characters (a-z, A-Z, 0-9)
longURL: the long url is from the user
URL Shortening:
URL Redirection:
Explain any trade offs you have made and why you made certain tech choices...
Read/Write: There are some trade-offs I am making when designing the read/write flows around the cache. Because this system is a read heavy system. We need the cache to make the read fast and write could be slow. In such case, the app server will send the response back to client first and then persist the change to data store.
Availability/Consistency: Another trade off I made is around the consistency. As the system is ready heavy and we would like the client receives the response as soon as possible, so the system must be a high available over consistency system. Eventually consistency to other replications is acceptable.
Try to discuss as many failure scenarios/bottlenecks as possible.
Failure Scenarios:
We do have a few things that could lower the system performance or even down.
Bottlenecks: