Loading...
POST
admin/shortenUrl(string) -> string
admin/deleteShortcut(string) -> void
https://domain.com/[shortcut_id] -> 328 redirect to url
Client can create URL shortcuts via a RESTful API with manage service. The manage service generate a shortcut id (sid) and writes the sid: url key pair to a redis instance.
Client can be redirected to URLs by navigating to the domain/[sid] url. The API Gateway handles these requests by reading the corresponding URL from the Redis database and responding with a 328 redirect with the URL. For even better performance, we can enable edge caching for popular urls on the API gateway to skip the Redis read.