Better HN
topnewbestaskshowjobs
Log inSign up

bobjenk

1 karma · joined Aug 4, 2014 (12y ago) · 2 submissions

Submissions

comment 12y ago · link · parent

Well at the moment, I would consider Redis more useful than Varnish due to expired events. As to follow the "one caching model to rule them all" rule, how about using ngx_lua to dynamically change a static .html file with the data from Redis thus cutting out php-fpm (unless they are logged in, then requests will go directly to php-fpm)?

Or use Varnish, use Redis for expired events but with an empty value and use keyspace notifications to automatically remove the data related to that key from the database and purge Varnish.

comment 12y ago · link · parent

If I was to use Varnish, would that make my need for Redis obsolete - should I switch to a non-memory based key-value db and use Varnish on top of that?

My current stack: nginx/php-fpm/redis. Nginx and Redis serve me well, but php-fpm makes my website rather slow with high volumes of traffic, so I believe the solution for that would be Varnish(?).