Loading...
If the daily active user 1Million
The
/generate API to generate short version of url
It should be post call with payload as
{
"url": "https://example.com",
"customName": "example" //this could be optional
}
response should be:
{
shortendUrl: "https://abc.io/short"
}
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 SQL would be better option as only text is involved.
A table with three column one is id, original url and shortend url
A microservice can be created and when post api call happens we can generate a random url if customName is empty and return it immediately and can do the db persisting later