Loading...
Estimate the scale of the system. Consider daily active users, read/write ratio, storage requirements, bandwidth, and any relevant QPS calculations...
CREATE /api/v1/createUrl
GET /api/v1/:shortUrl
Нам что бы решить эту проблему нужно сначала понять что мы будем хранить в базе данных
Получается что нам нужно будет хранить мэппинг url
ShortUrlId -> OriginalUrl
и так же нам нужен кеш с ТТЛ допустим 1 минута что бы повторяющиеся линки сразу же фетчились
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.