cloudsidedev / appside

Multitenant environment automation.
http://cloudside.ch
GNU Affero General Public License v3.0
38 stars 7 forks source link

Improve default Varnish config #47

Closed ocean90 closed 6 years ago

ocean90 commented 7 years ago

Current file: https://github.com/ttssdev/appflow/blob/3326173f651a4e6b5ace960f167d56659a2221ff/playbooks/roles/web/templates/etc/varnish/default.vcl.j2

I'd like to see a few things changed:

Some resources:

ivomarino commented 7 years ago

@ocean90 in order to do this we need to introduce some new {{ conf_varnish_* }} vars so first question is: what needs to be tuneable via vars and what features can directly be hardcoded into the configuration?

ocean90 commented 7 years ago

Right, a few settings should be default and probably changeable via a config var.

Found another thing: Cookies are currently not removed from images. https://www.varnish-cache.org/lists/pipermail/varnish-misc/2011-February/019915.html should help for this.

ocean90 commented 7 years ago

HAProxy has a balance option which is leastconn by default . I guess this makes sense for Apache but I found several posts which suggest uri for Varnish, see http://stackoverflow.com/a/16901584/3507335 and http://blog.haproxy.com/2012/08/25/haproxy-varnish-and-the-single-hostname-website/ (scroll to the Configuration section). Thoughts on that?

https://cbonte.github.io/haproxy-dconv/configuration-1.6.html#4.2-balance