-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Labels
[Feature] Real-time CollaborationPhase 3 of the Gutenberg roadmap around real-time collaborationPhase 3 of the Gutenberg roadmap around real-time collaboration[Status] In ProgressTracking issues with work in progressTracking issues with work in progress
Description
What problem does this address?
The RTC polling client currently runs at these frequencies:
- Once per second if no other collaborators are in the room
- Four times per second if other collaborators are in the room
- A couple of back off rules apply for the following circumstances:
- An error occurs while syncing
- The editor is not visible, ie the user is using another browser tab
As these rates generate a large number of requests, it may cause problems for users of low end hosting plans and result in them inadvertently DDOSing themselves.
See Discussion on WP#64845
What is your proposed solution?
Add filters to the polling intervals defined in this block of code to allow third party developers to slow the syncing rate as desired.
gutenberg/packages/sync/src/providers/http-polling/polling-manager.ts
Lines 31 to 36 in 129e668
| const POLLING_INTERVAL_IN_MS = 1000; // 1 second or 1000 milliseconds | |
| const POLLING_INTERVAL_WITH_COLLABORATORS_IN_MS = 250; // 250 milliseconds | |
| // Must be less than the server-side AWARENESS_TIMEOUT (30 s) to avoid | |
| // false disconnects when the tab is in the background. | |
| const POLLING_INTERVAL_BACKGROUND_TAB_IN_MS = 25 * 1000; // 25 seconds | |
| const MAX_ERROR_BACKOFF_IN_MS = 30 * 1000; // 30 seconds |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Feature] Real-time CollaborationPhase 3 of the Gutenberg roadmap around real-time collaborationPhase 3 of the Gutenberg roadmap around real-time collaboration[Status] In ProgressTracking issues with work in progressTracking issues with work in progress
Type
Fields
Give feedbackNo fields configured for Enhancement.
Projects
Status
✅ Done