Monster Menus 7.x-1.21+ and Varnish

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Monster Menus 7.x-1.21+ and Varnish

McBride, Ian S.
We've upgraded from 7.x-1.20 to 7.x-1.22 over the weekend and are looking to add support for the Varnish integration. I believe that the correct choice for "Varnish Cache Clearing" on /admin/config/development/varnish is "None", which will allow MM to handle the cache clears. Is this correct?

Also, we're creating a new template for our servers using Chef and are curious about Varnish 4. The Varnish module doesn't support V4 in its current release, but there's a small patch (https://www.drupal.org/node/2235433) to add support that's been on the dev branch for months. Which version of Varnish are you using, if any?

Thanks,


Ian McBride
Web Technologies & Services
Middlebury College
[hidden email]

---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=722129
or send a blank email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monster Menus 7.x-1.21+ and Varnish

Dan Wilga-2
On 11/3/15 11:04 AM, McBride, Ian S. wrote:
> We've upgraded from 7.x-1.20 to 7.x-1.22 over the weekend and are looking to add support for the Varnish integration. I believe that the correct choice for "Varnish Cache Clearing" on /admin/config/development/varnish is "None", which will allow MM to handle the cache clears. Is this correct?
Yes, though you should consider the MM sub-module mm_pagecache. It does
a much better job of only clearing the specific caches that are dirty.
The README that comes with it also talks about this option, though it
says that the other thing you can do is remove this line from your
settings.php file:

$conf['cache_class_cache_page'] = 'VarnishCache';
> Also, we're creating a new template for our servers using Chef and are curious about Varnish 4. The Varnish module doesn't support V4 in its current release, but there's a small patch (https://www.drupal.org/node/2235433) to add support that's been on the dev branch for months. Which version of Varnish are you using, if any?
We haven't used 4. Our site is flying nicely with 3.


---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=722130
or send a blank email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Monster Menus 7.x-1.21+ and Varnish

Jay Dansand
In reply to this post by McBride, Ian S.
Dear Ian,

For Cache Clearing Type we use "Selective (experimental; ruses expire.module)". Varnish is latest 3.x branch; I haven't had a chance to update our VCL to Varnish 4.x, but intend to do it over the winter break.

Expire.module is actually "Cache Expiration" (https://www.drupal.org/project/expire) which ties nicely into MM if you use our Bridge MM w/Cache Expiration module (https://github.com/jaydansand/mm_tweaks/tree/master/bridge_mm_expire).

Relevant Cache Expiration settings (admin/config/system/expire) are:
- Status of implementation: External expiration
- Include base URL in expires: unchecked

Some settings.php changes (make sure your Varnish VCL provides the X-Forwarded-For header to the backend):
$conf['reverse_proxy'] = TRUE;
$conf['reverse_proxy_addresses'] = array('127.0.0.1', '::1', etc..);

Huge caveat: by default they want you to do this:
$conf['cache_backends'][] = 'sites/all/modules/varnish/varnish.cache.inc';
$conf['cache_class_cache_page'] = 'VarnishCache';

VarnishCache doesn't actually provide any caching; it's just a listener for VarnishCache->clear() calls so that it can inform Varnish to ban appropriate URLs. The downside is it basically disables Drupal's DB (or other) page cache, which is still a nice thing to have for HTTPS traffic. So, instead of that nonsense, we did this:
$conf['cache_backends'][] = 'sites/all/modules/varnish/varnish.cache.inc';
$conf['cache_backends'][] = 'sites/all/modules/lawrence_university_helper/lawrence_university_helper_cache.inc';
$conf['cache_class_cache_page'] = 'DrupalLUHCache';

The DrupalLUHCache class comes from lawrence_university_helper_cache.inc and is a wrapper around any arbitrary default cache class (we use FileCache instead of DrupalDBCache). It acts on the default cache backend but also forwards clears to VarnishCache so that Varnish URLs are still banned correctly. I can forward along the (very simple and straightforward) contents of DrupalLUHCache on request.

And our FileCache setup:
$conf['cache_backends'][] = 'sites/all/modules/filecache/filecache.inc';
$conf['cache_default_class'] = 'DrupalFileCache';
$conf['filecache_directory'] = '/SECURE/HARDDRIVE/LOCATION/GOOD_LONG_RANDOM_STRING';
(And make sure the directory is correctly locked-down on the filesystem level.)

Speaking of MM 7.x-2.0 to 7.x-2.2 updates (which we recently did as well), I'm really hoping https://www.drupal.org/node/2604308 gains traction. :)

-- 
Jay Dansand '08
Senior Web Application Developer
Technology Services, Seeley G. Mudd Library
Lawrence University
Appleton, WI
920-832-6585
[hidden email]


-----Original Message-----
From: McBride, Ian S. [mailto:[hidden email]]
Sent: Tuesday, November 03, 2015 10:04 AM
To: Monster Menus Development <[hidden email]>
Subject: Monster Menus 7.x-1.21+ and Varnish

We've upgraded from 7.x-1.20 to 7.x-1.22 over the weekend and are looking to add support for the Varnish integration. I believe that the correct choice for "Varnish Cache Clearing" on /admin/config/development/varnish is "None", which will allow MM to handle the cache clears. Is this correct?

Also, we're creating a new template for our servers using Chef and are curious about Varnish 4. The Varnish module doesn't support V4 in its current release, but there's a small patch (https://www.drupal.org/node/2235433) to add support that's been on the dev branch for months. Which version of Varnish are you using, if any?

Thanks,


Ian McBride
Web Technologies & Services
Middlebury College
[hidden email]

---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=849053.214f550f57fa54a976b5f2d087b6d379&n=T&l=monster_menus&o=722129
or send a blank email to [hidden email]

---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=722131
or send a blank email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monster Menus 7.x-1.21+ and Varnish

McBride, Ian S.
In reply to this post by McBride, Ian S.
Thanks for those tips, Dan and Jay. Exceptionally helpful, as always. We're probably going to move forward with Varnish 4, since it's the new default in RHEL 7. We'll let the list know about any issues we encounter.
________________________________________
From: Jay Dansand <[hidden email]>
Sent: Tuesday, November 3, 2015 11:43 AM
To: Monster Menus Development
Subject: RE: Monster Menus 7.x-1.21+ and Varnish

Dear Ian,

For Cache Clearing Type we use "Selective (experimental; ruses expire.module)". Varnish is latest 3.x branch; I haven't had a chance to update our VCL to Varnish 4.x, but intend to do it over the winter break.

Expire.module is actually "Cache Expiration" (https://www.drupal.org/project/expire) which ties nicely into MM if you use our Bridge MM w/Cache Expiration module (https://github.com/jaydansand/mm_tweaks/tree/master/bridge_mm_expire).

Relevant Cache Expiration settings (admin/config/system/expire) are:
- Status of implementation: External expiration
- Include base URL in expires: unchecked

Some settings.php changes (make sure your Varnish VCL provides the X-Forwarded-For header to the backend):
$conf['reverse_proxy'] = TRUE;
$conf['reverse_proxy_addresses'] = array('127.0.0.1', '::1', etc..);

Huge caveat: by default they want you to do this:
$conf['cache_backends'][] = 'sites/all/modules/varnish/varnish.cache.inc';
$conf['cache_class_cache_page'] = 'VarnishCache';

VarnishCache doesn't actually provide any caching; it's just a listener for VarnishCache->clear() calls so that it can inform Varnish to ban appropriate URLs. The downside is it basically disables Drupal's DB (or other) page cache, which is still a nice thing to have for HTTPS traffic. So, instead of that nonsense, we did this:
$conf['cache_backends'][] = 'sites/all/modules/varnish/varnish.cache.inc';
$conf['cache_backends'][] = 'sites/all/modules/lawrence_university_helper/lawrence_university_helper_cache.inc';
$conf['cache_class_cache_page'] = 'DrupalLUHCache';

The DrupalLUHCache class comes from lawrence_university_helper_cache.inc and is a wrapper around any arbitrary default cache class (we use FileCache instead of DrupalDBCache). It acts on the default cache backend but also forwards clears to VarnishCache so that Varnish URLs are still banned correctly. I can forward along the (very simple and straightforward) contents of DrupalLUHCache on request.

And our FileCache setup:
$conf['cache_backends'][] = 'sites/all/modules/filecache/filecache.inc';
$conf['cache_default_class'] = 'DrupalFileCache';
$conf['filecache_directory'] = '/SECURE/HARDDRIVE/LOCATION/GOOD_LONG_RANDOM_STRING';
(And make sure the directory is correctly locked-down on the filesystem level.)

Speaking of MM 7.x-2.0 to 7.x-2.2 updates (which we recently did as well), I'm really hoping https://www.drupal.org/node/2604308 gains traction. :)

--
Jay Dansand '08
Senior Web Application Developer
Technology Services, Seeley G. Mudd Library
Lawrence University
Appleton, WI
920-832-6585
[hidden email]


-----Original Message-----
From: McBride, Ian S. [mailto:[hidden email]]
Sent: Tuesday, November 03, 2015 10:04 AM
To: Monster Menus Development <[hidden email]>
Subject: Monster Menus 7.x-1.21+ and Varnish

We've upgraded from 7.x-1.20 to 7.x-1.22 over the weekend and are looking to add support for the Varnish integration. I believe that the correct choice for "Varnish Cache Clearing" on /admin/config/development/varnish is "None", which will allow MM to handle the cache clears. Is this correct?

Also, we're creating a new template for our servers using Chef and are curious about Varnish 4. The Varnish module doesn't support V4 in its current release, but there's a small patch (https://www.drupal.org/node/2235433) to add support that's been on the dev branch for months. Which version of Varnish are you using, if any?

Thanks,


Ian McBride
Web Technologies & Services
Middlebury College
[hidden email]

---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=849053.214f550f57fa54a976b5f2d087b6d379&n=T&l=monster_menus&o=722129
or send a blank email to [hidden email]

---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685439.7e7cbccf9bb225cf8471bffe1cb67503&n=T&l=monster_menus&o=722131
or send a blank email to [hidden email]

---
You are currently subscribed to monster_menus as: [hidden email].
To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=722135
or send a blank email to [hidden email]
Loading...