6 ms·
I'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
by georgyo 4y ago
I'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?
- xena 4y agoYeah, unless I can find a CDN to cache my blog (and maybe its static assets) that would be affordable enough for my needs.
- bradgessler 4y agoI wrote an article about making server-side rendered sites fast around the world without a CDN at https://fly.io/ruby-dispatch/semi-static-websites/ https://fly.io/ruby-dispatch/semi-static-websites/ My examples are in Ruby, which is super slow compared to what you’re doing. Now I’m super curious what kind of performance you’d get globally on Fly if you deployed to a bunch of different regions.
- xena 4y agoIf you can help me get a Nix flake running on Fly, I'll try it!
- bradgessler 4y agoI know next to nothing about Nix at Fly except there's a few folks who are looking at it at Fly. The repo at https://github.com/fly-apps/nix-base https://github.com/fly-apps/nix-base shows how its working for a Rails app. Is that enough to get you running with Nix flakes? Beyond that https://community.fly.io https://community.fly.io is the best place to get help with Nix on Fly since my abilities are exceeded. There's a Rust thread at https://community.fly.io/t/running-reproducible-rust-a-fly-and-nix-love-story/3781 https://community.fly.io/t/running-reproducible-rust-a-fly-a... that touches on nix flakes.
- MuffinFlavored 4y ago> The speed of light is only so fast. Is the Internet not connected internationally (US -> Europe for example) via cables underneath the ocean? Speed of light would be satellite, light? Not electric current? Or is electricity flowing through a wire also "speed of light"?
- xena 4y agoI'm not an expert in cross-continent interconnects, I have no idea what cables are being used there. I'd imagine that a lot of the backbone of the internet is fiber because that's what all the SRE memes say about wandering backhoes and sharks being the primary predator of fiber optic cables.
- pkhuong 4y agoThese cables are fiber optics, but either way, the speed of light is still a bound.
- potatochup 4y agoMost (all?) Intercontinental cables will be fibre optic. So it's the speed of light (in glass, not a vacuum)
- tsimionescu 4y agoFirst of all, the "speed of light" is usually referring to c, the maximum speed that matter or energy can move at. Second of all, electrical signals in cables move at speeds slightly lower than c, but very close to it, so the speed of light is still a very good approximation of the possible upper bound. Third of all, intercontinental cables are normally fiber optic, for several reasons. That is, they directly transmit light through the cable. Fourth, it should be noted that electricity is actually the same thing as light, since photons are the carrier particles of the electric field (when two charged particles interact, they are actually exchanging a photon). It's of course not visible light, but satellite communication also uses radio waves normally, which are not visible light either. Finally, either through cables or through satellite communication, the distance/c minimum theoretical one-way latency is usually a significant under-estimation of the actually possible minimal latency, since the straight-line distance is significantly shorter than the actual cable/satellite-and-back distance that the signals must travel - the difference in straight-line VS physical path distance is typically much larger than the difference between the theoretical speed of light and the actual speed of the electrical signal propagation.