• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Add-on LiteSpeed Cache / Varnish for XenForo

Alfa1

Well-known member
#1
Litespeed cache has severely reduced the number of servers needed for my big board and other sites.
Unfortunately XenForo does not have a LiteSpeed Cache plugin like vbulletin has. This would be very useful to have.
 

Moshe1010

Well-known member
#3
I already requested that from Litespeed directly. They said they will look into it, and I basically think that it should be official by their team and shouldn't be 3rd party due to the development of Litespeed and overall support.

Just take in account that Litespeed cache is available for high end licenses only (2+ CPU, around $1000 owned)
 

Alfa1

Well-known member
#4
I already requested that from Litespeed directly. They said they will look into it, and I basically think that it should be official by their team and shouldn't be 3rd party due to the development of Litespeed and overall support.

Just take in account that Litespeed cache is available for high end licenses only (2+ CPU, around $1000 owned)
I have read your request on the litespeed forums but they basically replied that they are not going to do it themselves. When a 3rd party creates it they will add it to their wiki.
I do agree that they should add it themselves as we indeed pay a hefty sum for their product. However, if they do not add it, then we still need it. And that seems to be the situation.
 

Alfa1

Well-known member
#5
This is an interesting read:

Varnish Cache and XenForo
We’ve had very positive results accelerating XenForo with Varnish (in a cluster configuration). In terms of VCL, we’ve taken a slightly different approach but it results in better caching / acceleration. We’ve allocated a small per-user cache (logged in users), which makes XenForo pages load even faster than normal conditions. This reserved cache is rather transparent to the end user so no code changes are required. In fact, the acceleration we provide requires no modification to any XF files at all.

Static files, however, are stripped out of cookies in the Varnish VCL and served from the same cache area. The performance gains are tremendous. We’ve already published a Varnish plugin for cPanel and DirectAdmin that incorporates these tweaks. Feel free to read more about it here: http://www.unixy.net/varnish
http://blog.unixy.net/2011/04/varnish-and-xenforo/

@Slavik This is rather remarkable:
"Static files, however, are stripped out of cookies in the Varnish VCL and served from the same cache area. The performance gains are tremendous."
Am I understanding this correctly and does this null the need for separate domains for static files? That would resolve my issues with mixed content (I'm serving up ssl only to subscribers)
 

Alfa1

Well-known member
#7
No. The benefit is that you can treat xenforo usergroups differently. For example: I have 4 million users per month on my site (3 million uniques) of which only 10.000 are logged in members. So 99.7% of my readers are guests and only 0.3% of my readers are members. Normally all these 4 million users will request pages from my site which means that tens of million of page views are dynamically generated on the fly which needs a lot of server resources. But with Varnish + LiteSpeed Cache plugged into XenForo this will reduce these 4 million users to just 1 user and simply generate a new cache/image of the site every X seconds / minutes and server the same cache/image up to those 4 million users. Logged in users will still see live content.
Now instead of needing a lot of costly servers, I can just use 1 server for this amount of traffic.
 

Slavik

XenForo moderator
Staff member
#8
No. The benefit is that you can treat xenforo usergroups differently. For example: I have 4 million users per month on my site (3 million uniques) of which only 10.000 are logged in members. So 99.7% of my readers are guests and only 0.3% of my readers are members. Normally all these 4 million users will request pages from my site which means that tens of million of page views are dynamically generated on the fly which needs a lot of server resources. But with Varnish + LiteSpeed Cache plugged into XenForo this will reduce these 4 million users to just 1 user and simply generate a new cache/image of the site every X seconds / minutes and server the same cache/image up to those 4 million users. Logged in users will still see live content.
Now instead of needing a lot of costly servers, I can just use 1 server for this amount of traffic.
I'll poke my guy at LiteSpeed tonight to have a chat their main man who deals with the LiteSpeed cache to find out the best way to do this for XF.