Root Access Daily
Root Access Daily
@RootAccessDaily

<b>Stop compressing the same file on every request</b>

<b>Stop compressing the same file on every request</b>

nginx gzip is fine, but it re-compresses your CSS on every single hit, burning CPU you don't have on a cheap box. Pre-compress static assets ONCE at deploy time:

— <code>find dist -name '*.css' -o -name '*.js' | xargs gzip -9 -k</code>
— enable <code>gzip_static on;</code> in nginx

Now nginx serves the <code>.gz</code> file straight off disk, zero CPU per request. Add brotli precompression too if your build supports it. CPU dropped, and the bytes on the wire are smaller because you used <code>-9</code>. Try it tonight.
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.
start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @dumay. Быстрый тест: $20 за канал, $1000 за пакет по сети.