I’m planning on using the wp-discourse plugin on a gulf coast weather forecasting site that typically services ~10-20k pageviews/day, but occasionally during severe weather events will push 1.5-2MM PV/day to approx 500-700k visitors. The site + its hosting strategy have been battle-tested through several severe weather events and things work great under pressure, primarily thanks to careful design and a lot of help from Cloudflare.
The site’s users are used to a low-friction commenting experience via native Wordpress comments, so there will be some adjustment (like getting them used tgo clicking the “Continue the discussion at…” link) that the user-facing staff is ready to manage.
However, what they won’t tolerate is the variable 10-minute delay between posting comments and them being shown on the daily Wordpress post’s page. They will want new comments (up to the configured limit) immediately on the homepage upon posting, similar to how native WP comments are displayed immediately after posting.
After screwing around with the built-in options to try to make posts show up immediately without nginx’s fastcgi caching, wordpress, or browser caching interfering with new comments appearing on refresh after they’re posted, the I have added the following two mu-plugins to mitigate this and cause newly posted comments to show up on the Wordpress side on refresh:
wp-discourse-transient-killer.php
wp-discourse-cache-header-fix.php
This has solved my problem: new posts to Wordpress-created Discourse threads now appear below the wordpress posts instantly on refresh.
But I’m kind of at the edge of my competence here — what am I breaking/screwing up/undermining by doing this?
I don’t particularly care about creating additional load on my webhost by having the comment endpoint being hammered by visitors checking the daily weather forecast page (with its embedded Discourse comments) — that is a problem I can solve by throwing money at it. My primary requirement is avoiding 20,000+ users sending me emails asking me why their comments aren’t appearing instantly on the homepage when they post them.
Is this the right approach? Is what I’m doing wise? Does it create additional security or performance issues I haven’t anticipated? Basically, am I screwing things up by doing this?
Thanks