Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
San1ty Posted November 23, 2011 Posted November 23, 2011 Oh, That's great I thought I saw in your first post that you had to change some php file in the admin folder. I guess my varnish settings aren't correct yet. (I have sent you a pm with my config). When I go to my web page now, I can see some cookies being set (probably by cloudflare)? Maybe my cookies aren't being unset correctly? My web page for reference (http://www.l2p.be).
altenerg Posted November 23, 2011 Posted November 23, 2011 No offense, but you came here for help on a varnish config.. took absolutely nobody's advice on how to get it working properly (and thus have none of your own real-world benchmarks to compare to), and now are suggesting alternatives? Cached compiled php scripts (opcode caches) are not the same as what Varnish does. If you want to suggest alternatives start another thread please. Facebook, Twitter, The New York Times, WikiPedia, WikiMedia, Globo, The Hindu, NBC Universal Bravo TV, The Grammy Awards and Data.gov.uk are some of the major organizations using Varnish.. it might be possible that they don't all collectively have a bunch of idiot sysadmins running their show. ok thank you for the list. Now that you've gotten that off your chest... back on topic now. :baby:
San1ty Posted November 23, 2011 Posted November 23, 2011 Just an update: I have temporarily disabled cloudflare and now images are showing as hit's, so that's great! But my index pages keeps showing up as a miss, is this the expected behaviour we are going for or am I still doing something wrong. I would expect that if I'm not logged in everything is cached.
San1ty Posted November 24, 2011 Posted November 24, 2011 It seems ip.board always sets a session_id cookie, so pages never get cached. I'm amazed you get anything cached... I must be doing something wrong...
-Seven- Posted December 26, 2011 Posted December 26, 2011 It seems ip.board always sets a session_id cookie, so pages never get cached. I'm amazed you get anything cached... I must be doing something wrong... yes im now wondering how varnish can increase the page load speed if the member is logged in ???
San1ty Posted December 27, 2011 Posted December 27, 2011 That is not the scope of this implementation but can be accomplished with ESI. I am still struggling to get varnish too work when a user isn't logged in. Even if you are not logged in IPB sets a cookie.
-Seven- Posted December 28, 2011 Posted December 28, 2011 so there is no meaning in seting up varnish on a IPB site :)
Grumpy Posted December 29, 2011 Posted December 29, 2011 yes im now wondering how varnish can increase the page load speed if the member is logged in ??? Directly: It will serve static content such as images faster than apache. Indirectly: It lowers the overall requirements. So, the hardware would be more available to serve your members immediately. Both of these effects are significant. so there is no meaning in seting up varnish on a IPB site :smile: Partly, I agree. Varnish's main purpose is to cache html. HTML cannot be cached and caching will only slow things further if requirements are 100% dynamic (which is the very nature of a forum). Varnish is awesome when the read to write ratio is very high. For example, if a post in wordpress is made, it may be seen 1000 times before another edit -- or never edited again. There are no tracking of what guests have done by browsing. This would be ideal for varnish. If a new post in the forum is made, it may be seen only a few times before someone makes a reply. To top it off, it may show different result depending on the member as mods needs to see moderation buttons and such. It also needs to show different results per person based on things like read post/unread post, etc. This would not be an ideal situation for varnish. Admittedly, I did not read all 7 pages of this post and I'm not sure how the OP or the followers have setup their systems. But, caching http for guests will prevent guest tracking as they're only served cached content. If this bypass was given, varnish would be doing nothing but serving static content and making useless caches that misses 100% of the time -- which would be better done with something like nginx.
.Nuno. Posted January 5, 2012 Posted January 5, 2012 Hello, My setup just caches html content generated from backend (apache+php) server for guests. There is no point to cache content for members since each other has it's own setting and this doesn't make any sense. For serving static content, i use nginx because it's fast and there is no point serving images from memory using varnish because reading static content with a webserver is not a heavy task.
SecureGateway Posted January 22, 2012 Posted January 22, 2012 We recently deployed a test dedicated server with cPanel/WHM and the site loads ok but we're thinking of purchasing the cPanel Varnish addon and this has made me think I should be buy it nowhttp://www.unixy.net/varnish/ Works with DirectAdmin/cPanel and doesn't cost much either, has anyone tried this module?
kmf Posted February 19, 2012 Posted February 19, 2012 OK. is there a final, ultimate configuration for IPB with varnish now?
kmf Posted February 19, 2012 Posted February 19, 2012 I mean one configuration which allows topic views update without ESI? As it seems now, the varnish configs would have problem not only with topic view, but also the board totals: amount of guests oline Talking about this config http://community.invisionpower.com/topic/328398-unbelievable-results-with-varnish/page__st__100#entry2195883
bikedorkseattle Posted March 2, 2012 Posted March 2, 2012 I wish I could remember where I saw this, but I've seem some tests where varnish isn't really any faster then nginx at serving static content. With that in mind, and with all the difficulties involved in setting up varnish, is it really worth it?
babau-yoyo Posted April 20, 2012 Posted April 20, 2012 I'm setting up on the new server a setup with varnish (3.0.2) in front of nginx (1.1.18) with fastcgi I did read al the thead and I did try the suggested config but I have some issue online users is not working if I try to modify any post the editor will not close i can't upload images any suggestion will be apreciated
Grumpy Posted April 21, 2012 Posted April 21, 2012 I'm setting up on the new server a setup with varnish (3.0.2) in front of nginx (1.1.18) with fastcgi I did read al the thead and I did try the suggested config but I have some issue online users is not working if I try to modify any post the editor will not close i can't upload images any suggestion will be apreciated Well, clearly you either didn't read my post in this thread, or chose to ignore it. Online users is not working because you've set yourself a reverse proxy. You need to configure the reverse proxy so that the proper IPs are passed into proper fields. Otherwise, everything will appear as if the connection is going from and to localhost. Your setup of varnish in front and nginx in the back is completely redundant, useless, introducing complications and wasting of resources. Just remove varnish entirely.
babau-yoyo Posted April 21, 2012 Posted April 21, 2012 actualy is what I did end up with now I'm runnig nginx only and all'is working I did read your posts in this tread but clearly I did not understand them :D
Linda A Posted May 3, 2012 Posted May 3, 2012 I'm really interested in trying out Varnish... but all the fantastic advice, various configurations, etc. makes things a bit confusing! So, to go back to Ambar's config based on mat206's (which I'm looking at mainly because we have Google Analytics as well) ... Am I understanding right that that is basically it? Install Varnish, get it set up, and using that config -- no modifications to core code or even templates needed?
Luis Manson Posted May 4, 2012 Posted May 4, 2012 be careful, IIRC those settings will not work on newer varnish versions and you will need to change a few lines...but i might be wrong, just test, if you need to make changes they are easy to google ;)
Linda A Posted May 10, 2012 Posted May 10, 2012 Varnish seems to update quite a lot! But is the basic question still sound -- that the linked config (updated to work with the latest Varnish) will cache pages without needing to modify any templates?
maddog107_merged Posted May 30, 2012 Posted May 30, 2012 We are looking at using Varnish, so thanks for all the info. One question though, did any of you consider/implement what Nuno mentioned here? So if I understand correctly, the current configs on this page would give guests semi-stale content that would only refresh every X seconds correct? If we implemented the changes Nuno proposed everyone would see the most recent content, the only downside is potentially the cache is being flushed relatively often? Any insight would be appreciated, I will try to implement this on my site sometime this week.
Elly Posted June 2, 2012 Posted June 2, 2012 I used settings from Ambar (modified version of mat206) as base for a server of ours. The code change is I added varnish to pass through for mobile users as well (somehow one of the mobile pages got cached, so it's removed to be safe). Also removed the ability to change themes for guests since it doesn't work and may be a source of confusion. The forum is publicly accessible by guests so the main reason was to have guests read from a semi-stale cache and leave resources for our logged in members only. There were no reported problems with Varnish 3.0.2. Varnish passes requests back to a nginx/fpm/xcache backend. We have the realIP module compiled in nginx. To do list would be to look at doing this with fcgicache in nginx or using varnish to cache logged in users as well (with some sort of purge). First step is going to be looking at .Nuno.'s config settings as it seems like the right stuff!
.Nuno. Posted June 8, 2012 Posted June 8, 2012 To do list would be to look at doing this with fcgicache in nginx or using varnish to cache logged in users as well (with some sort of purge). First step is going to be looking at .Nuno.'s config settings as it seems like the right stuff! You have more info here:
Luis Manson Posted June 8, 2012 Posted June 8, 2012 so, we can be sure guest caching is working.. what about logged in members? anyone is caching those?
Elly Posted June 9, 2012 Posted June 9, 2012 Nuno, did you manage to get purge working with fast reply?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.