docker-cartojw/config
Nick Ballenger f0b5b7e79f Updated Varnish to cache SQL API / Windshaft
The previous version of this file was enough to cache requests for the
SQL API, but unfortunately no traffic was ever reaching Varnish to be
cached. Nginx was proxying directly to the SQL API port, and Varnish was
set to listen on 6081, so it wasn't able to intercept those requests. I
updated the Nginx proxy config to aim at 6081 for requests to both SQL
API and Windshaft, so now Varnish is receiving traffic. However, in
order to know which backend to send traffic to, I had to add a custom
HTTP header in the Nginx proxy pass. That header is picked up in the
`vcl_recv` varnish subroutine and used to switch between backends.

Additionally I've added logic for controlling what hosts can issue an
HTTP PURGE command--in this case just localhost, since everything is on
a single image. The purges will typically come from a Postgres trigger.

As an overview of the purge related changes, see the Varnish docs here:

https://varnish-cache.org/docs/3.0/tutorial/purging.html#http-purges
2019-07-18 16:27:25 -07:00
..
app_config.yml Commented out 'invalidation_service' section 2019-07-18 16:17:28 -07:00
CartoDB-dev.js Sync config files 2018-04-04 22:23:54 +02:00
cartodb.nginx.proxy.conf Changing the Nginx config to a single file 2019-07-18 16:08:53 -07:00
database.yml Rename active record adaptor 2018-07-27 09:11:15 +02:00
varnish.vcl Updated Varnish to cache SQL API / Windshaft 2019-07-18 16:27:25 -07:00
WS-dev.js Dataviews did not show due to Windshaft opening dataviews on own port instead of reverse proxy 2017-04-13 14:32:49 +02:00