Config for community.fastly.com?
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.
The configuration for this website is very minimal: we use the default configuration of caching according to the
Cache-Controlheaders 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.
I am a bit confused.
- 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?
- 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.
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.
@triblondon I'm also planning to use Fastly's
site shieldfor my discourse site. I'm working on the setup right now, and was very surprised to find you wrote:
[quote="triblondon, post:4, topic:1046"] If our discourse server were to go down, based on our current cache configuration, the community.fastly.com site would be unreachable [/quote]
community.fastly.comwould go down even with Fastly's
site shieldconfiguration... How would you compare under a traffic surge to not using site shield?
How would that look from perspective of end users of community.fastly.com?
I believe per Leon's earlier comment, we are not using shielding for our discourse site. Also, by default Discourse does not allow pages to be edge cached so there is no benefit to shielding, unless you wish to reduce the origin traffic for static assets, or you modify the Discourse caching behaviour.
[quote="triblondon, post:7, topic:1046"] we are not using shielding for our discourse site [/quote]
Funny, that's the exact opposite of what they posted about this on Discourse's own forum... ;-)
You can see why I would be confused.
Discourse seems to be growing, and recommends Fastly. You even use it for your own forum. Whatever you can do to make the process easier for users would be appreciated. Some things that come to mind:
- More direct, concise, clear documentation (without so many links... DRY don't apply to documentation)
- Performance metrics: Discourse alone, Discourse + Fastly, Discourse + Site Shield...
Please sign in to leave a comment.