Is it worth paying for Litespeed + LiteMage Cache on a Magento 2 site, or can I do just as well with Varnish, Turpentine, Redis, etc.?

Full disclosure: I work for a hosting company that regularly uses LiteSpeed, but we've worked with a lot of technologies and Magento, including Apache, Nginx, Varnish and so forth.

In our experience, nothing beats the speed of LiteMage (the caching system within LiteSpeed for Magento). We regularly migrate clients from other platforms with Time To First Byte (TTFB) speeds of ~0.5-4.5s and can reduce that to ~20-100ms using LiteSpeed's solution. They are also very fast to implement newer technologies as well, with QUIC already fully integrated within the LiteSpeed web server.

In my view, one of its major advantages other than speed is that it's very simple to implement, which reduces the complexity of the stack on the server-side. With Nginx/Varnish there are a lot of server-side components to configure maintain, whereas with LSWS + LiteMage, there's just one that 'just works'. As Danila mentioned, there's also a reduction in the communication time between layers as a result.

As you might already know, the associated LiteMage module that is installed within Magento handles automatic cache invalidation based on the Magento tag system.

For those running larger stores that require load balanced servers, there's also the LiteSpeed WebADC load balancing platform that incorporates LiteMage caching. With this, the cache is kept within the load balancing layer and is therefore centralised.

Of course, as a commercial product there's a cost involved, so in my opinion whether or not this is worth paying for will depend on how much you're selling via the store, and also the time that you have for configuration/maintenance of other solutions.

Hope that helps!


Should I believe any of those claims?

You shouldn't believe any claims unless you can independently verify them.

That said, it's easy to decipher why LiteSpeed could be somewhat faster than other setups.

Let's take the most performant open source stack which consists of NGINX + Varnish.

NGINX terminates TLS and proxies that over to Varnish, which is the caching layer.

In its turn, Varnish proxies request to the backend (if it is not satisfiable from the cache at the moment), over to NGINX again.

So it is an NGINX sandwich of sorts. The potential performance offenders here is proxy buffering in both NGINX and Varnish.

What proxy buffering means, in short, is that before giving output to the client, NGINX #1 (TLS) will wait to collect a small amount of response data from Varnish (which is the backend to NGINX #1).

This is behavior, which is by default (proxy buffering is enabled). It is primarily useful for ensuring that the slow client will not "burn down" backend connections (which are typically RAM-hungry):

Say you have one really slow client, and NGINX proxy buffering is not enabled. It means that a connection is fully "consumed" by the client, while it's slowly receiving data. NGINX must keep the connection to its backend (normally, it's PHP-FPM in other setups), while synchronously delivering data to the client.

With proxy buffering enabled, NGINX can close the connection to the backend (which is good, especially if it required a good amount of RAM, in case of PHP-FPM as backend), as soon as it got the whole response from it, and then NGINX can release the data to the client, while the backend is free to do other stuff.

However, in the NGINX sandwich kind of stack (Magento 2 case), it is arguable whether you need proxy buffering all the way and you may want to tune it (and it would surely produce better results).

Why is because you would then reduce the time it takes for different components of the stack to "talk" to each other. Again, those are:

NGINX #1 (TLS) -> Varnish -> NGINX -> PHP-FPM.

Keeping buffering in NGINX #1 is not very essential because its backend is a lightweight process (Varnish). The same applies to Varnish -> NGINX link. But buffering there is absolutely required because this is how the caching works in Varnish - it has to get the entire response in order to cache it.

So either way, you can decipher from all of this, that having LiteSpeed combine TLS termination feature of the above stack, and not just that, is already a win because it won't cause extra buffering between different software components.

If LiteSpeed + LiteMage Cache is really that much faster

It really isn't that much faster! Those numbers where NGINX+Varnish performs at 3K requests per second are very good, not to even bother considering other solutions.

why aren't more people discussing it here?

Because it's commercial, and you'd rarely if ever, hit the ceiling with the Varnish solution. You need to have an Uber-size traffic Magento 2 instance (literally) to warrant the need for Litespeed, although I would just fine-tune things with proxy buffering as a first step.

Again, these numbers from Litespeed look like they are, and maybe they are times better. But this is more of a marketing thing, e.g.: would you really bother so much if you had a trillion dollars which you can never spend in your entire lifetime but then someone offered you another 2 trillions for doing some extra work? I'd say "meh, I am fine with my trillion, thank you" :)