system-design-with-code
system-design-with-code copied to clipboard
Url Shortening Service
- [X] From long url to short url
- [ ] From short to long url
- [X] Basic conversion
- [ ] Who should append the hostname in short url
- [ ] Considerations for load balancing
- [ ] What if there are multiple hostnames
- [X] Redirect the user to long url when short url is visited
- [x] Url expiry
- [ ] User Authentication
- [x] Basic authentication or OpenId Connect
- [x] Authenticated User will get Analytics and Tracking
- [x] Without authentication create url with default expiry maybe a week
- [ ] Delete url
- [ ] Add Documentation
- [ ] Add logging (include user IP for tracking and analytics)
- [ ] short-url-gen service should only be accessible using public network, id-gen-service etc should not be directly reachable from outside network.
- [ ] Distributed tracing with Zipkin
@npathai We can think of logging ip of the users visiting any short url. This will help in gathering stats and creating reports.
@IAmPramod Good idea. I will consider that. Currently I am converting both microservices to Micronaut framework.
I started quick and dirty but now when I thought about discovery dashboard, graphana and Prometheus, zipkin tracing, health checks, etc. It would have required hell lot of manual work to get everything going.
So I have taken decision to move to Micronaut. Will push update soon.
@IAmPramod Hard work of porting both services to Micronaut is complete. Phew! Now adding new features should not be that much pain. Check it out. I will update the diagram to reflect the changes. In terms of starting the application, it remains the same.
@npathai Sure, will pull the code and go through it.