discourse/config/initializers
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
..
001-redis.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
002-freedom_patches.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
003-sql_builder.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
004-message_bus.rb PERF: message_bus will be deferred by server when flooded 2019-08-09 17:48:01 +10:00
004-rails_multisite.rb FIX: Sidekiq fails to start if any of the multisite has problems. 2018-12-12 11:30:14 +08:00
005-site_settings.rb FEATURE: SKIP_DB_AND_REDIS env var (#7756) 2019-06-13 12:58:27 +10:00
006-ensure_login_hint.rb FEATURE: SKIP_DB_AND_REDIS env var (#7756) 2019-06-13 12:58:27 +10:00
006-mini_profiler.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
008-rack-cors.rb Add Cache-Control header to CORS (#6490) 2018-10-16 10:46:55 +11:00
009-omniauth.rb SECURITY: Require POST with CSRF token for OmniAuth request phase 2019-08-08 11:58:00 +01:00
010-discourse_iife.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
011-rack-protection.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
012-web_hook_events.rb Only show deprecation warning if the webhook is active 2019-06-10 16:23:12 -04:00
013-excon_defaults.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
014-track-setting-changes.rb FIX: Recalculate settings when dependent settings change 2019-07-12 21:10:10 +02:00
050-force_https.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
099-anon-cache.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
099-defer.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
099-drain_pool.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-i18n.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-logster.rb DEV: improve on rake db:create 2019-06-14 15:06:07 +10:00
100-oj.rb PERF: Use Oj for serializing JSON. (#7820) 2019-06-28 12:16:00 +10:00
100-onebox_options.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-push-notifications.rb FIX: Make initializer work on first db:migrate 2019-07-30 10:23:24 +02:00
100-quiet_logger.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-secret_token.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-session_store.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-sidekiq.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-silence_logger.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-strong_parameters.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-verify_config.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-watch_for_restart.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-wrap_parameters.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
101-lograge.rb DEV: check for specifics when looking at ENABLE_LOGRAGE 2019-06-13 15:59:20 +10:00
200-message_bus_request_tracker.rb FEATURE: enable_performance_http_headers for performance diagnostics 2019-06-05 16:08:11 +10:00
300-perf.rb PERF: remove SQL notifiers for every SQL execution 2019-05-09 17:44:46 +10:00
000-mini_sql.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
000-post_migration.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00