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...
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.
A frontend is required for the user to interact with the system. A backend server hosts the API and the database. The database only needs to be accessed locally, and is only exposed through API calls.
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.
The user uses a front-end web interface as the primary way to interact with the system. The front-end contains an input entry point that takes in a URL.
The front-end queries the global API endpoint to create a URL, passing in the provided URL as a parameter. If the API returns an error, it handles it and returns a diagnosis message to the user.
A backend server runs the API. It validates the URLs for shortening and querying. The server also communicates with a central database cluster to create and retrieve entries when a shortened URL is created and queried.
The database runs in the same server as the API server, and is only exposed locally. This allows for greater security from network threats, but leads to more migration work when scaling horizontally. This can be mitigated with parameterizing connections, which can be transferred even after a database is migrated.