Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
MGBrose Posted January 30, 2013 Posted January 30, 2013 I've tried nearly all VCL configs here, on 3.4.2 but none of them seems to cache anything else than "index.php?blablah.css" files (all other php files are a MISS) Especially, the above configs do not cache forums, threads, etc on my stock 3.4 install, for a not logged in user. I'm guessing there is a new cookie in 3.4 that creates a problem. I'm new in varnish and I'd appreciate your thought on this issue... its really interesting after 3.4.1 my hit ratio dropped we went from 25% to around 16-17% might be some merit to your thinking there.
Dmacleo Posted January 30, 2013 Posted January 30, 2013 possibly the change in the getlastpost stuff?
Weppa333 Posted January 31, 2013 Posted January 31, 2013 After a day of research, I found out that running varnish with IPB is a nightmare. Not only the board, but also the separate modules are able to set cookies in all directions, and basically with a stock install of varnish you only cache a few calls to index.php for CSS files. None of the config files posted in this thread work with 3.4 ( maybe they did work with 3.2 or 3.3, i'm just talking about my own experience with 3.4.2 here). See #174. I'm a newbie with varnish ( but not with other similar systems) and the main problem is that the config files posted here seem to only care about cookies sent by the browser, whereas many pages in IPB have set-cookies. Of course this can be solved. I found on varnish's website an interesting VCL that can be used as a basis for something semi useful. But it's not enough. The complexity of the VCL for a working copy of varnish with 3.4, with a hit ratio close to 100% for non logged in users (which is my goal), is so time consuming that I won't spend more time in this. You have to discard some cookies, not others, and I'm not even talking about thread views and online users, or accurate purging of edited/updated thread. I was just hoping a "gross caching" for most guests' pageviews, and this is nearly impossible to achieve. I'm impressed some people seem to use varnish with IPB, and would like to know more about it.
Dmacleo Posted January 31, 2013 Posted January 31, 2013 unixy varnish plugin has a vcl that seems to work, while it won't work on a non cpanel setup possibly some of the info from it would help you?
Weppa333 Posted January 31, 2013 Posted January 31, 2013 thanks I'll have a look the key seems to be to get rid of all cookies, in each and every possible situation... And that's not an easy task with no doc.
Weppa333 Posted January 31, 2013 Posted January 31, 2013 could you include all the VCLs in the ZIP ? like # Set up disabled include "/etc/varnish/disabled.vcl"; # Exclude upgrade, install, server-status, etc include "/etc/varnish/known.exclude.vcl"; # Set up exceptions include "/etc/varnish/url.exclude.vcl"; # Set up exceptions include "/etc/varnish/debugurl.exclude.vcl"; # Set up exceptions include "/etc/varnish/vhost.exclude.vcl"; # Set up vhost+url exceptions include "/etc/varnish/vhosturl.exclude.vcl"; # Set up cPanel reseller exceptions include "/etc/varnish/reseller.exclude.vcl"; # Restart rule for bfile recv include "/etc/varnish/bigfile.recv.vcl"; thanks :)
Weppa333 Posted January 31, 2013 Posted January 31, 2013 in particular these 3 unset beresp.http.set-cookie; include "/etc/varnish/static.ttl.vcl"; } include "/etc/varnish/slashdot.fetch.vcl"; else { include "/etc/varnish/dynamic.ttl.vcl"; }
Weppa333 Posted January 31, 2013 Posted January 31, 2013 I'll also try varnish on 3.3 as so many people seems to be satisfied with it, there MUST be something new in 3.4 killing hitrate otherwise this thread wouldn't exist at all. Maybe the rather weird session_id cookie is new to 3.4 ?
Dmacleo Posted January 31, 2013 Posted January 31, 2013 no power and tethered to droid, no way to easily get the other vcls. will try to remember when power back on.
nTiM Posted February 26, 2013 Posted February 26, 2013 Hi, My host installed Varnihs on my server but then I start having issues with IP Board. Users can loggin or they get logged in with diferent user, so they can write and act as someone else. Now, I have to much spam post on forum, which I cant delete. I am using IP Board and IP Chat. I find configuration for Varnish and edit to my default.vlc backend default { .host = "127.0.0.1"; .port = "8080"; } sub vcl_recv { ## == Normalise Accept-Encoding == if (req.http.Accept-Encoding) { if (req.url ~ ".(jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg)$") { # No point in compressing these remove req.http.Accept-Encoding; } elsif (req.http.Accept-Encoding ~ "gzip") { set req.http.Accept-Encoding = "gzip"; } elsif (req.http.Accept-Encoding ~ "deflate") { set req.http.Accept-Encoding = "deflate"; } else { # unkown algorithm remove req.http.Accept-Encoding; } } ## == Mobile == if (req.http.User-Agent ~ "(iPad|iPhone|iPod|Android|SymbianOS|^BlackBerry|^SonyEricsson|^Nokia|^SAMSUNG|^LG)") { return(pass); } if (!((req.http.Cookie ~ "member_id=" && req.http.Cookie !~ "member_id=(0|-1)") || req.http.Cookie ~ "(guestSkinChoice|language)")) { if (req.url ~ "^/(public|forum|topic|gallery|blogs|members|user|calendar)/") { unset req.http.cookie; set req.grace = 15s; } if (req.url == "/" || req.url == "/index.php") { unset req.http.cookie; set req.grace = 15s; } } } sub vcl_fetch { if (!((req.http.Cookie ~ "member_id=" && req.http.Cookie !~ "member_id=(0|-1)") || req.http.Cookie ~ "(guestSkinChoice|language)")) { ## == INDEX == if (req.url == "/" || req.url == "/index.php") { unset beresp.http.set-cookie; set beresp.ttl = 300s; set beresp.grace = 30s; } ## == ESI == if (req.url ~ "^/(gallery/image|topic)/") { esi; unset beresp.http.set-cookie; set beresp.ttl = 300s; set beresp.grace = 30s; ## Others } elseif (req.url ~ "^/(public|forum|gallery|blogs|members|user|calendar)/") { unset beresp.http.set-cookie; set beresp.ttl = 600s; set beresp.grace = 30s; } } } sub vcl_deliver { remove resp.http.X-Varnish; remove resp.http.Via; remove resp.http.Age; remove resp.http.X-Powered-By; if (obj.hits > 0) { set resp.http.X-Cache = "HIT"; set resp.http.X-Cache-Hits = obj.hits; } else { set resp.http.X-Cache = "MISS"; } } But I still keep having the same issues. Please help
Dmacleo Posted February 26, 2013 Posted February 26, 2013 see if turning off furls in acp helps. i am using the unixy cpanel plugin on dedicated server, no idea how a straight varnish setup would work.
nTiM Posted February 26, 2013 Posted February 26, 2013 Hi, Sorry, I am new with IP board and Varnish as well, so can you tell me what to turn off, because I find a lot of settings:Friendly URL Features Redirect to new friendly URL format - YES URL type - Path info Use .htaccess mod_rewrite - No In SEO ADVICE I found that .htaccess mod_rewrite should be turned on. My forum link now are like this: http://www.sitename.com/forum/index.php/forum/9-forum-i-chat/ Please advice :) Thanks
Dmacleo Posted February 26, 2013 Posted February 26, 2013 Redirect to new friendly URL format turn that to off and see if people keep getting logged out. if it does help then its (in my experience) often a cookie setting. if that does not help get the host to bypass varnish to you. its hard to setup on a dynamic site.
IveLeft... Posted February 26, 2013 Posted February 26, 2013 +1 to cookies - Make sure they are set for site wide
nTiM Posted February 27, 2013 Posted February 27, 2013 Hi Guys, I guess:Redirect to new friendly URL format - NO did the trick. But I still have a lot of spam post from user that do not exist in members list, Guest_SegePleatte_*, Guest_Kuisajk* ... I try to delete their posts, but nothing happend. Please help, Thanks
Dmacleo Posted February 27, 2013 Posted February 27, 2013 spam post stuff is not related to varnish, best to start topic about that on its own. get the host to bypass you for varnish and run you straight to apache.
nTiM Posted February 27, 2013 Posted February 27, 2013 I still have loggin problem. :sad: Users get logged in by different user. I did not change anything from last post. Maybe to try delete this code that I added to default.vcl and try with friendly URL format - NO ?Thanks
Dmacleo Posted February 27, 2013 Posted February 27, 2013 get the host to bypass you.if they don't want to then get a new host.
sobrenome Posted February 12, 2015 Posted February 12, 2015 Has anyone tried Varnish 4 with IPS 4 already?The new software architecture gives the same content for all guests and I think that it will make Varnish much more useful and easy to set up.I am very excited with the performance that Varnish can give to the new IPS 4.
ASTRAPI Posted February 12, 2015 Posted February 12, 2015 The new software architecture gives the same content for all guests Memcache take care of it on IPS4
sobrenome Posted February 13, 2015 Posted February 13, 2015 Memcache take care of it on IPS4 I have done a little research and memcached can be combined with varnish for even faster loading. Am I wrong?
RevengeFNF Posted February 13, 2015 Posted February 13, 2015 If you use NGINX, there is no reason to use Varnish also. For the Guest Pages Cache, Memcache takes that job.
IveLeft... Posted February 13, 2015 Posted February 13, 2015 I have done a little research and memcached can be combined with varnish for even faster loading. Am I wrong?Unixy use both memcache and varnish on their own servershttp://www.unixy.net/accelerate-your-server/
ASTRAPI Posted February 13, 2015 Posted February 13, 2015 At the moment i use ZendOpcache with Memcache and is fine
Recommended Posts
Archived
This topic is now archived and is closed to further replies.