by tln · 5y ago · 0 comments
Have you worked on optimizing DNS and TLS negotiation at all?
Just now on my laptop, the first request took 1.9 seconds!
$ time curl -v https://link.warpurl.com/DrMbLW
...
real 0m1.936s
$ time curl -v https://link.warpurl.com/DrMbLW
...
real 0m0.079s
What did you use to check the latency worldwide? I've got a quickly hacked shortener running on CF workers, curious how it stacks up :)PS. there is a small typo on homepage... "and the number of changes you"
The first hit any user from your country/city navigating the URL will be slow aka normal URL Shortener speed. There after it is cached in that region/city/CDN POP. That is why the second curl was so fast. If you ask a friend living in close proximity to you (same region or city) to also navigate it, they should see the fast time.
I wrote more about the logic behind it in this blog post: https://link.warpurl.com/x4BSyC I also delve into the architecture a bit. Spoiler alert, it is 100% serverless!
And FWIW I requested the same link on my laptop and then phone and my phone took >1s to resolve the redirect.
I will extend that text by saying 1 ping is taking the average time of hitting the URL 5 times. The reason for taking 5 readings directly after each other is to filter out any network related issues and noise on the graphs.
When you see a spike in the x axis, it means that was the average latency of hitting that URL 5 times for that interval(every 10 minutes).
I am doing it every 10 minutes because I want to show the variance not only for a single region but especially across regions. If we were to take the p95 or even p99 tail latencies over say 100k clicks, WarpURL will be significantly faster.
I don't think I am being dishonest in my claim?
Maybe hitting the URL every 10 minutes keeps the URLs you test in your cache.
If users are frequently getting >1s due to cold starts and your stats are systematically excluding them, then the stats aren't very realistic.
I'm guessing you can see how many cold starts there were in AWS Lambda somehow... I can say anecdotally that I got slow responses several times from link.warpurl.com
I can't be an AWS Community Hero and not use AWS in my personal projects/business ;)
Thanks for noticing the typo :) I am a bit sloppy when it comes to language.