
Reblogged by slightlyoff@toot.cafe ("Alex Russell"):
GuillaumeRossolini@infosec.exchange ("Guillaume Rossolini") wrote:
@slightlyoff I’ve wanted to get back to you for a while because you were a big reason for our e-commerce website being the way it was, technically speaking.
We took your earlier publications to heart, and we applied every kind of optimization we could think of, just to try and stay a little bit ahead of the competition. I think we did all right in that respect.
When the company was shut down at the end of 2018, I finally put together a document outlining our techniques. It’s not a tutorial and lots of things aren’t perfect, but I think a lot of this can still be used.
I was weirdly proud of the server-side cached pre-renders for several cohorts (at FRONTEND > web server > httpd in the link below), which we were continuously building for the 5 most viewed pages. These on disk static pages didn’t have a long TTL but this allowed us to reevaluate the need for a pricy CDN.
These Apache2 rules allow for high throughput of the pages that are cached in this way. Because of this, we have been able to withstand traffic generated through TV mentions and other publicity without the help of a CDN or any autoscaling.
Of course we eventually placed nginx in front of httpd and these rules became somewhat redundant, but not if you include brotli and other CPU-heavy compression.
Anyway I’m geeking out on a dead website. Here’s the doc: