Loading...
When users request a url using the shortened version, the request would go to the nearest CDN to the user, check the cache if the information is available in the cache and is valid, the CDN would directly return the redirect request to the browser with the relevant information like the actual URL, one thing to think of here is analytics, yet even if a request does go to the server, we don't want to cause any delays in the response therefor recording the event to the database would also cause latency. the solution is to in both cases resolve the request and respond to the client, while in parallel at the CDN level or the server level record the event in an event pipeline, then asynchronosly resolve the analytics events.