Loading...
Get /shortCode -> redirect to big url
Post { bigurl } -> return { shortUrl , expiry }
For user data, PostgreSQL is usually better because:
MongoDB can be considered if:
Used as:
Used as:
High available -> Url and User service should be horizontal scalable and managed by eks so they are not
Low Latency -> reduce the call using redis, instead of db
Horizontal Scalability -> make the services horizontal scalable
Concurrent request ? how is that a issue, like multiple read can be supported using redis, and even if multiple reads on same row is it supported
Cache miss ? do we have to persist it somewhere else ?
Avoid Collisions -> avoid collision of url generation so in this we can have 7 bit uuid generation which will be unique