Varnish

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Scam Warning
Post Reply
User avatar
DoYouSpeakWak
Registered User
Posts: 2307
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Name: Hans Lassen
Contact:

Varnish

Post by DoYouSpeakWak » Sat Oct 15, 2011 2:30 pm

Hey everybody

Have any of you experimented with varnish for your phpBB3 ? I have done a bit of testing the past weeks, but hard to get it to run smooth with all the vcl settings. Its a mess,

Searched wide and low, seems like nobody have released any info on how to do this. With some luck somebody here wanna share their experiences. phpbb.com uses varnish, So this can be done, but im not sure the website team wanna share what they have learned by using varnish, but lets see.

Wak
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid phpBB help and System administrator services.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66816
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Varnish

Post by Lumpy Burgertushie » Sat Oct 15, 2011 3:13 pm

what is "varnish" other than something to protect wood finishes?


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
DoYouSpeakWak
Registered User
Posts: 2307
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Name: Hans Lassen
Contact:

Re: Varnish

Post by DoYouSpeakWak » Sat Oct 15, 2011 7:10 pm

Sorry. Link
https://www.varnish-cache.org/

The basic idea is when you request a file from the phpBB3 directory its allready cached and your request wont even reach apache or whatever webserver you use. Thereby loading your site faster. Problem with it is that its easy to install but hard to config, cookies, x-forwarded has to be just right or else phpBB3 wont work at all.
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid phpBB help and System administrator services.

User avatar
/a3
Registered User
Posts: 411
Joined: Sun Sep 19, 2010 9:08 am
Location: /dev/random

Re: Varnish

Post by /a3 » Sat Oct 15, 2011 10:11 pm

I don't think phpBB sends ETags or Last Modified headers for normal pages, so having a reverse proxy wouldn't help for that. However, I imagine it would help for smilies, images, avatars, styles, style images etc. (avatars and uploaded files do send "Last-Modified" headers).

You don't have to limit yourself to Varnish; there are plenty of reverse proxies out there. See this Wikipedia page: Reverse proxy.

After checking the headers from phpBB.com, it appears that Varnish is used here as well.

User avatar
Dog Cow
Registered User
Posts: 2495
Joined: Fri Jan 28, 2005 12:14 am
Contact:

Re: Varnish

Post by Dog Cow » Mon Oct 17, 2011 11:16 pm

Caching a phpBB forum is an interesting problem: the posts themselves are relatively static (yes, we can edit them, but not too often or frequently are they edited), but the HTML around the posts is dynamic. That is, I see my log out Dog Cow link, and how many new PMs I have. This will change for other users.

Caching content for guests is easier, though, since presumably we can show nearly any guest user the same HTML page. However, if we want to keep track of the SID, (for guests without cookies) well then we're back to the same problem for logged-in users.

Also, Varnish doesn't like caching web pages that set cookies.
Moof!
Mac GUI Vault: Retro Apple II & Macintosh computing archive.
Inside Allerton bookMac GUIMac 512K Blog

User avatar
Lumpy Burgertushie
Registered User
Posts: 66816
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Varnish

Post by Lumpy Burgertushie » Tue Oct 18, 2011 4:13 pm

unless you have a very busy, very large site, I don't see that the caching is worth the problems it quite often seems to cause.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

youngjediknight
Registered User
Posts: 385
Joined: Wed Apr 22, 2009 2:58 pm

Re: Varnish

Post by youngjediknight » Tue Apr 02, 2013 12:06 am

I had just moved to a new server that was blazing fast ... almost too fast. When I noticed that read forums were not showing as read and images were not updating. That's when I asked my host to confirm my suspicion that they were using server side caching ... turns out its Varnish.

Should Varnish be disabled entirely for phpbb websites?

User avatar
MichaelC
Consultant
Consultant
Posts: 3642
Joined: Mon Dec 21, 2009 3:36 pm
Location: Surrey, UK
Name: Michael Cullum
Contact:

Re: Varnish

Post by MichaelC » Tue Apr 02, 2013 1:10 pm

/a3 wrote:After checking the headers from phpBB.com, it appears that Varnish is used here as well.
It was in use here until we moved the site to be served over SSL although we may bring it back in future (hence the reason the headers were not removed).
:)
Formerly known as Unknown Bliss.
Formerly Website Team Lead/Manager & Development Team.
Please don't PM me for support (or stuff that belongs in the forums or tracker) but otherwise feel free

Tonttu
Registered User
Posts: 17
Joined: Sat Aug 08, 2009 7:34 am

Re: Varnish

Post by Tonttu » Sat Jan 25, 2014 11:17 am

MichaelC wrote:
/a3 wrote:After checking the headers from phpBB.com, it appears that Varnish is used here as well.
It was in use here until we moved the site to be served over SSL although we may bring it back in future (hence the reason the headers were not removed).
This article might help: http://www.zivtech.com/blog/implementin ... celeration

Any stories or tutorials about setting up Varnish with phpBB?

Post Reply

Return to “phpBB Discussion”