6 ms·
There may be further opportunities for improvement. Chrome and Curl both report it takes about 1100ms to load the linked page's HTML, split about 50/50 between
by jmillikin 4y ago
There may be further opportunities for improvement.
Chrome and Curl both report it takes about 1100ms to load the linked page's HTML, split about 50/50 between establishing a connection and fetching content. I'm not sure how the implementation works internally but that seems like a long time for a site served from memory and aiming to be "high-performance". The images bring the total time up to around 5.7s.
As a point of comparison, my site (nginx serving static content, on the 0.25 CPU GCP instance) serves the index page in 250ms. Of that, ~140ms is connection setup (DNS, TCP, TLS). The whole page loads in < 1000ms.
https://i.imgur.com/X4LDbWj.png https://i.imgur.com/X4LDbWj.png
https://i.imgur.com/Ccwzmgz.png https://i.imgur.com/Ccwzmgz.png
One thing to remember is that when a server like nginx serves static content, it's often serving it from the page cache (memory). The author of Varnish has written at some length about the benefits of using the OS page cache, for example <https://varnish-cache.org/docs/trunk/phk/notes.html https://varnish-cache.org/docs/trunk/phk/notes.html>. Some of the same principles can be applied even for servers that render dynamically (by caching expensive fragments).
- xena 4y agoAuthor here. I wrote that post before I axed the CDN for my blog site itself. It was true at the time of writing, but it is not true anymore because I need to redo the CDN for the blog itself. All the images are CDNed with XeDN though.
- georgyo 4y agoI'm trying to parse what you are saying here. You removed the CDN and the site got slower? How do you know your site was the one that was fast or just the CDN? IE, the CDN should have added a lot of extra hops and made things slower. To me, this implies the rust code is very poor at opening and closing connections, so the CDNs keep alive is pasting over that issue.
- xena 4y agoThe main thing the CDN provided was nodes on basically every continent that kept the site in cache. Without those servers on every continent keeping the site in cache, it takes longer to get to the netherlands to get the site loaded. The speed of light is only so fast.
- progrus 4y agoAnd probably more importantly, routing packets through international traffic all the way to the Netherlands takes a while too.
- hn92726819 4y agoIf they are keeping your article cached, what's the point of saying it's a high-performance blog? Saying it's slow because the CDN down means that it's just slow... You can have a 'high performance' blog run on a raspberry pi zero if it's globally cached by someone else, but then I wouldn't say that's high performance. Cool article though. Agree on the ructe part, and I dislike how whitespace is handled. I wish Jade/Pug templates could be done in rust but will check out Maud.
- xena 4y agoThe blog itself is fast. The internet is the slow part.
- xena 4y agoI thought of a better way to phrase it. The website itself is fast, but the process of you observing the website is slow because of limitations of the speed of light (or other interconnects the internet uses to get your traffic to Helsinki).
- joshspankit 4y agoI think what you’re saying is that if OP were to test your site from Helsinki they would see the server speed you’re talking about. Is that right?
- Groxx 4y agoAs a contrasting point: I'm consistently getting 150ms from their main domain, and 25-35ms from their cdn subdomain. I suspect most of your latency is from "the internet".