Skip to content

chore(PLA-2206): add exponential backoff with jitter to Phoenix socket reconnection#862

Merged
jareddellitt merged 3 commits into
mainfrom
jdellitt/PLA-2206
Feb 18, 2026
Merged

chore(PLA-2206): add exponential backoff with jitter to Phoenix socket reconnection#862
jareddellitt merged 3 commits into
mainfrom
jdellitt/PLA-2206

Conversation

@jareddellitt
Copy link
Copy Markdown
Contributor

Description

The default Phoenix Socket reconnection schedule is deterministic and aggressive (first retry at 10ms, no randomization), which causes all clients to slam the server at the same instant when connectivity is restored. This configures reconnectAfterMs and rejoinAfterMs on the Phoenix Socket with exponential backoff and full jitter to try to mitigate some thundering herd problems during outages or deployments.

@jareddellitt jareddellitt requested a review from cjbell February 13, 2026 23:32
@linear
Copy link
Copy Markdown

linear Bot commented Feb 13, 2026

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 13, 2026

🦋 Changeset detected

Latest commit: 40b89e3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@knocklabs/client Patch
client-example Patch
guide-example Patch
@knocklabs/expo Patch
@knocklabs/react-core Patch
@knocklabs/react-native Patch
@knocklabs/react Patch
@knocklabs/expo-example Patch
ms-teams-connect-example Patch
nextjs-app-dir-example Patch
nextjs-example Patch
slack-connect-example Patch
slack-kit-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
javascript-ms-teams-connect-example Ready Ready Preview, Comment Feb 14, 2026 2:23pm
javascript-nextjs-example Ready Ready Preview, Comment Feb 14, 2026 2:23pm
javascript-slack-connect-example Ready Ready Preview, Comment Feb 14, 2026 2:23pm
javascript-slack-kit-example Ready Ready Preview, Comment Feb 14, 2026 2:23pm

Request Review

Copy link
Copy Markdown
Contributor

@connorlindsey connorlindsey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@jareddellitt jareddellitt merged commit cb7148b into main Feb 18, 2026
12 checks passed
@jareddellitt jareddellitt deleted the jdellitt/PLA-2206 branch February 18, 2026 17:04
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 96.87500% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 67.28%. Comparing base (b77679b) to head (40b89e3).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/client/src/helpers.ts 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #862      +/-   ##
==========================================
+ Coverage   66.96%   67.28%   +0.32%     
==========================================
  Files         203      203              
  Lines        8539     8537       -2     
  Branches     1104     1109       +5     
==========================================
+ Hits         5718     5744      +26     
+ Misses       2801     2768      -33     
- Partials       20       25       +5     
Files with missing lines Coverage Δ
packages/client/src/api.ts 100.00% <100.00%> (ø)
packages/client/src/helpers.ts 95.83% <94.73%> (-4.17%) ⬇️

... and 11 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants