This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/spec
Sam 32393f72b1
PERF: backoff background requests when overloaded (#10888)
When the server gets overloaded and lots of requests start queuing server
will attempt to shed load by returning 429 errors on background requests.

The client can flag a request as background by setting the header:
`Discourse-Background` to `true`

Out-of-the-box we shed load when the queue time goes above 0.5 seconds.

The only request we shed at the moment is the request to load up a new post
when someone posts to a topic.

We can extend this as we go with a more general pattern on the client.

Previous to this change, rate limiting would "break" the post stream which
would make suggested topics vanish and users would have to scroll the page
to see more posts in the topic.

Server needs this protection for cases where tons of clients are navigated
to a topic and a new post is made. This can lead to a self inflicted denial
of service if enough clients are viewing the topic.

Due to the internal security design of Discourse it is hard for a large
number of clients to share a channel where we would pass the full post body
via the message bus.

It also renames (and deprecates) triggerNewPostInStream to triggerNewPostsInStream

This allows us to load a batch of new posts cleanly, so the controller can
keep track of a backlog

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2020-10-13 16:56:03 +11:00
..
components PERF: backoff background requests when overloaded (#10888) 2020-10-13 16:56:03 +11:00
fabricators DEV: Move UserApiKey scopes to dedicated table (#10704) 2020-09-29 10:57:48 +01:00
fixtures SECURITY: return error on oversized images 2020-09-14 10:45:11 +10:00
helpers DEV: Clean up S3 specs, stubs, and helpers 2020-09-28 12:02:25 +01:00
import_export FEATURE: Rake task to export groups (#9450) 2020-04-17 14:59:54 -07:00
initializers FIX: We need to skip users with associated reviewables when auto-approving (#9080) 2020-03-02 14:33:52 -05:00
integration FIX: Pluralized translation overrides didn't work for en_US 2020-08-29 00:11:46 +02:00
integrity DEV: Check English locale for errors in CI 2020-06-03 21:54:58 +02:00
jobs PERF: Do not enqueue digest emails when attempted recently (#10849) 2020-10-07 15:30:38 +01:00
lib FIX: second factor cannot be enabled if SSO is enabled (#10880) 2020-10-09 22:36:38 +05:30
mailers FIX: When admin changes an email for the user the user must confirm the change (#10830) 2020-10-07 13:02:24 +10:00
models FIX: Handle .discourse-compatibility syntax errors (#10891) 2020-10-12 18:25:06 +02:00
multisite DEV: Clean up S3 specs, stubs, and helpers 2020-09-28 12:02:25 +01:00
requests FEATURE - SiteSetting to disable user option to hide their profiles and presences (#10885) 2020-10-09 17:18:44 -04:00
script/import_scripts FIX: improve Vanilla importing (#10478) 2020-08-24 16:19:57 -04:00
serializers FEATURE: respect tags_sort_alphabetically setting when display tags (#10889) 2020-10-13 08:23:04 +11:00
services FIX: Handle .discourse-compatibility syntax errors (#10891) 2020-10-12 18:25:06 +02:00
support DEV: Fix a spec incompatibility with pre-2.28 git (#10892) 2020-10-12 19:59:54 +02:00
tasks DEV: Clean up S3 specs, stubs, and helpers 2020-09-28 12:02:25 +01:00
views/omniauth_callbacks FEATURE: Use full page redirection for all external auth methods (#8092) 2019-10-08 12:10:43 +01:00
rails_helper.rb DEV: Clean up S3 specs, stubs, and helpers 2020-09-28 12:02:25 +01:00
swagger_helper.rb DEV: Add rswag to aid in api documention (#9546) 2020-04-27 16:40:07 -06:00