Starting with Varnish 5.0, it is possible to load multiple VCL files and switch to the desired one from within VCL based on certain conditions (eg: Host header matching vhost-style). We should take advantage of such feature to merge the functionality of our current cache_misc cluster into cache_text.
Steps to complete the transition:
- Make puppet deploy misc VCL files on cache::text hosts
- Add the ability to load multiple VCL files to our custom reload-vcl script
- Make sure puppet triggers a reload of the additional VCL files upon modification. The reload procedure is a bit different compared to the one used to reload the main VCL program: vcl.load ; vcl.label instead of vcl.load ; vcl.use
- Matching the host header value with the hostnames currently handled by cache_misc (~90 at the time of this writing) should be done in a efficient and possibly clean way. The set functionality of libvmod-re2 seems apt, see https://phabricator.wikimedia.org/P7201 for how cache_text VCL might end up looking like if we choose to follow that approach
- Add misc cache::app_directors and cache::req_handling entries to text
- Some configuration settings differ between misc and text (eg: cache::websocket_support and cache::app_def_be_opts). See if/how they can be applied to text
- Test by pointing misc services to text IPs (eg: curl --resolve, resolv.conf)
- Add misc multicast purge IP, 239.128.0.115 to text's profile::cache::base::purge_multicasts
- DNS changes (geoip!misc-addrs -> geoip!text-addrs)
- Reimage misc hosts as spares
- Remove misc LVS services
- Cleanup