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/lib/middleware
Sam Saffron 1f47ed1ea3 PERF: message_bus will be deferred by server when flooded
The message_bus performs a fair amount of work prior to hijacking requests
this change ensures that if there is a situation where the server is flooded
message_bus will inform client to back off for 30 seconds + random(120 secs)

This back-off is ultra cheap and happens very early in the middleware.

It corrects a situation where a flood to message bus could cause the app
to become unresponsive

MessageBus update is here to ensure message_bus gem properly respects
Retry-After header and status 429.

Under normal state this code should never trigger, to disable raise the
value of DISCOURSE_REJECT_MESSAGE_BUS_QUEUE_SECONDS, default is to tell
message bus to go away if we are queueing for 100ms or longer
2019-08-09 17:48:01 +10:00
..
anonymous_cache.rb FIX: use crawler layout when saving url in Wayback Machine (#7667) 2019-06-03 12:13:32 +10:00
discourse_public_exceptions.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
enforce_hostname.rb SECURITY: enforce hostname to match discourse hostname 2018-11-15 15:23:06 +11:00
missing_avatars.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
omniauth_bypass_middleware.rb SECURITY: Require POST with CSRF token for OmniAuth request phase 2019-08-08 11:58:00 +01:00
request_tracker.rb PERF: message_bus will be deferred by server when flooded 2019-08-09 17:48:01 +10:00
turbo_dev.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00