3 ms·
This is really interesting! But keep in mind, Varnish is blazing fast if you manage to fit everything in memory by using malloc. Also Varnish is more configurab
by olavgg 11y ago
This is really interesting! But keep in mind, Varnish is blazing fast if you manage to fit everything in memory by using malloc. Also Varnish is more configurable than the Nginx cache. For example if you need to serve different content on the same url based on the Accept-Language header or a cookie, you can do this easily with Varnish by creating a lookup hash of the url + header value in VCL.
- poooogles 11y agoCame here to say this, feels as though they maybe didn't do Varnish justice in some ways. Kudos on the huge improvement though, it's the results that matter not the means.
- Veus 11y agoSeems to be that they did, but Varnish didn't suit their needs as they couldn't fit all the data in RAM. It's OK to change what you use because you outgrow it.
- amq 11y agoYou can do the same on Nginx with https://github.com/openresty/lua-nginx-module https://github.com/openresty/lua-nginx-module (and much more)
- woolie 11y agoAbsolutely, Varnish with malloc has (and still) served us well when the working set fits in RAM - that was why we started with Varnish. We still use it in front of our web servers and will for the foreseeable future!