1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actioncable/app/javascript/action_cable
Jonathan Hefner cc9a9e8503 Prevent thundering herd of Action Cable clients
This commit makes a few changes to the Action Cable client to prevent a
"thundering herd" of client reconnects after server connectivity loss:

* The client will wait a random amount between 1x and 3x of the stale
  threshold after the server's last ping before making the first
  reconnection attempt.
* Subsequent reconnection attempts now use exponential backoff instead
  of logarithmic backoff.  To allow the delay between reconnection
  attempts to increase slowly at first, the default exponentiation base
  is < 2.
* Random jitter is applied to each delay between reconnection attempts.

Co-authored-by: John Williams <john@veloshots.com>
2021-02-02 10:43:05 -06:00
..
adapters.js Replace window references in ActionCable with self 2019-01-14 17:44:35 -08:00
connection.js Simplify this.isActive() && this.webSocket into this.isActive() 2019-01-14 11:52:46 -08:00
connection_monitor.js Prevent thundering herd of Action Cable clients 2021-02-02 10:43:05 -06:00
consumer.js update from PR #36222 2020-02-12 13:31:43 -05:00
index.js Simplify ActionCable.createWebSocketURL and realphabetize exports (#35810) 2019-04-02 23:04:43 +02:00
internal.js Ensure @rails/actioncable package contains complete source 2019-08-15 09:19:59 -04:00
logger.js Added an example of logging 2020-07-06 23:32:55 +05:30
subscription.js Convert ActionCable javascript to ES2015 modules with modern build environment 2018-11-02 08:41:05 -07:00
subscriptions.js Fix typo in ACa documentation [ci skip] 2019-10-28 11:09:22 -04:00