Config for community.fastly.com?


#1

Is the config for community.fastly.com public?

We had an interesting conversation at https://meta.discourse.org/t/varnish-config-for-discourse/ about the varnish config for discourse. The community does not support a varnish config for dynamic content. So curious about how it is implemented here and if the config is open to the public.


#2

Hi Quintin,

The configuration for this website is very minimal: we use the default configuration of caching according to the Cache-Control headers sent by the origin. As mentioned in meta, this means caching the static assets and everything else passes through to the origin.

It might be possible to cache the content too and invalidate pages upon updates, but that would require changing Discourse. We do something similar with our Fastly Drupal and WordPress extensions.

HTH, Léon


#3

I am a bit confused.

  1. So does that mean even if this forum webserver goes down, theoretically all the pages will be served from Fastly, even if it’s read only? Discourse’ co-founder mentions the pages are all set ‘private’ https://meta.discourse.org/t/varnish-config-for-discourse/68575/17 Do you override this?
  2. If this is all going through the origin and respects Cache-Control, that means theoretically you are CDNing only the static assets, all the rest are just going through the origin without being cached.

My intention here is to run my discourse forum on Fastly and as a result wanted to take a look under the hood for the config.


#4

Quintin,

If our discourse server were to go down, based on our current cache configuration, the community.fastly.com site would be unreachable. As Leon says, it would be feasible to make Discourse ‘fastly aware’ so it could send purges when threads were updated, as we have done for Wordpress and Drupal.


#5

Thanks Andrew.
It would be awesome if Fastly owns up the varnish config for Discourse. A plugin-play solution for Discourse and you’ll get all the discourse customers :slight_smile: