All modern browsers support it, so you'd think it would be an easy win. The top nginx search is an official looking Google project which is long abandoned and doesn't support current versions of the library. There's an official nginx module which is commercial, and then finally there's a supported fork that that sits on about page three of Google.
Shared hosts don't generally support it. AWS Cloudfront doesn't support it, along with several other CDNs. Big + to Cloudflare for proper support.
It reduced my bundle sizes measurably. We all hate bloat and want to reduce bundles, but there seems to be a community inertia around mass deployment.
>official looking Google project which is long abandoned
Is [1] what you're talking about?
Take a peek at https://github.com/sjnam/lua-resty-brotli.
https://github.com/eustas/ngx_brotli
The "filter" module operates totally within nginx, and behaves roughly how we're used to with gzip. The "static" module allows you compress files as part of your build and just serve them - but the server still needs to understand the relevant headers and how to deal with them.
Edit: Also really surprised about your pricing strategy. What if somebody wants to surpass the 50k pageviews? Wouldn't it be better to at least give those another tier?
I'm planning on adding Redis support soon enough so that sudden spikes would have little impact on the database server (which is nearly always the bottleneck, unless you're compute-intensive, which isn't the case with Commento). So that if you suddenly get a few hundred thousand visitors, most API responses are cached and only a fraction will actually require disk access. Like reddit does, where it'll temporarily say there N comments, but when you open the page, there wouldn't be that many. A few seconds of inconsistency is a fine compromise in the comments world. Of course, Redis isn't going to magically make everything faster, so I'll have to be careful with where I introduce it. Optimise for the common case and all that.
I'm still in uni, and I've never actually worked on large-throughput, high-scalability stuff before, so all this has been a great learning experience for me. If you have any suggestions or war stories that might be relevant, I'm all ears!
And also, very well done! Your software seems to work very fine, a lot of thought already went into scaling and general stability of the backend. And for me, as fullstack working for a design company, your website layout and design is pretty good. If you didn't have help with that, kudos to you, good work, especially for someone still in college :)
Edit: Website performs pretty good in a Lighthouse audit, apart from Accessibility features.
>adtac has succeeded in reducing download to just 11 kB and isn’t done yet
Someone raised an issue to support Brotli in Commento (which I wasn't aware of) [1] and I did a quick test; it'd decrease the JS+CSS payload even further to under 8-9 KB. Nearly all modern browsers support Brotli [2], so I'm really looking forward to this.
I now realise this could be a modern take on the famous C10K problem, just with a different meaning: developing web services with under 10 kilobytes of payload :)
[1] https://gitlab.com/commento/commento/issues/125
[2] https://en.wikipedia.org/wiki/Brotli#Browser_support