system-design-with-code icon indicating copy to clipboard operation
system-design-with-code copied to clipboard

Url Shortening Service

Open npathai opened this issue 4 years ago • 4 comments

  • [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 avatar Jun 03 '20 19:06 npathai

@npathai We can think of logging ip of the users visiting any short url. This will help in gathering stats and creating reports.

IAmPramod avatar Jun 13 '20 07:06 IAmPramod

@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.

npathai avatar Jun 13 '20 08:06 npathai

@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 avatar Jun 13 '20 11:06 npathai

@npathai Sure, will pull the code and go through it.

IAmPramod avatar Jun 13 '20 12:06 IAmPramod