Comments

7 comments

  • Leon Brocard

    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

  • Quintin_Par

    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.

  • Andrew Betts

    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.

  • Quintin_Par

    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 :-)

  • Ryan Erwin

    @triblondon I'm also planning to use Fastly's site shield for 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]

    If your community.fastly.com would go down even with Fastly's site shield configuration... 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?

  • Andrew Betts

    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.

  • Ryan Erwin

    [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... ;-)

    image|584x228

    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.