<b>Cache dynamic pages for 1 second. Yes, dynamic.</b>
WordPress on a tiny box dies the moment you hit the front page from Reddit. Microcaching: cache even logged-out dynamic HTML for ONE second.
— <code>fastcgi_cache_path /tmp/ngx levels=1:2 keys_zone=mc:10m inactive=60m;</code>
— <code>fastcgi_cache_valid 200 1s;</code>
A traffic spike of 500 req/s means PHP only runs ~1 time per second; nginx serves the other 499 from cache. Content's at most 1s stale, nobody notices. A $5 box ate a front-page Hacker News hit and never blinked. Try it tonight.
Root Access Daily
@RootAccessDaily
<b>Cache dynamic pages for 1 second. Yes, dynamic.</b>
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.