Skip to content

docs(website): add upgrading guide for rolling deployments#4094

Draft
msfstef wants to merge 4 commits intomainfrom
msfstef/rolling-deploy-docs
Draft

docs(website): add upgrading guide for rolling deployments#4094
msfstef wants to merge 4 commits intomainfrom
msfstef/rolling-deploy-docs

Conversation

@msfstef
Copy link
Copy Markdown
Contributor

@msfstef msfstef commented Apr 6, 2026

Summary

  • Adds a new Upgrading guide (website/docs/guides/upgrading.md) covering how to upgrade Electric with minimal disruption using rolling deployments
  • Documents two scenarios: shared storage (recommended, with Docker Compose / Kubernetes / ECS examples) and separate storage (ephemeral, with separate replication stream IDs or temporary slots)
  • Documents two previously undocumented config options in config.md: CLEANUP_REPLICATION_SLOTS_ON_SHUTDOWN and ELECTRIC_TEMPORARY_REPLICATION_SLOT_USE_RANDOM_NAME
  • Adds sidebar entry and cross-link from the deployment guide

Context: PR #4075 introduced read-only mode for shared-disk rolling deploys. Discord conversations showed users struggling with rolling deploy patterns on ECS/Kubernetes.

Test plan

  • Run npm run dev in website/ and verify the guide renders at /docs/guides/upgrading
  • Check sidebar shows "Upgrading" after "Deployment"
  • Verify cross-link from deployment guide works
  • Verify new config entries render in /docs/api/config
  • Check all internal links resolve

🤖 Generated with Claude Code

Add a new guide covering how to upgrade Electric with minimal disruption
using rolling deployments, with shared storage (recommended) and separate
storage (ephemeral) scenarios. Includes Docker Compose, Kubernetes, and
AWS ECS examples.

Also documents two previously undocumented config options:
CLEANUP_REPLICATION_SLOTS_ON_SHUTDOWN and
ELECTRIC_TEMPORARY_REPLICATION_SLOT_USE_RANDOM_NAME.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@msfstef msfstef requested a review from balegas April 6, 2026 15:54
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 6, 2026

Deploy Preview for electric-next ready!

Name Link
🔨 Latest commit b6441b6
🔍 Latest deploy log https://app.netlify.com/projects/electric-next/deploys/69d501cf03ab4b00080e5b73
😎 Deploy Preview https://deploy-preview-4094--electric-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@balegas balegas left a comment

Choose a reason for hiding this comment

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

Apply suggestions as you see fit. happy to discuss things we're not aligned on

Restructure the upgrading guide based on review feedback:
- Add overview section with read-only mode explanation and comparison table
- Lighten advisory lock section, clarify it doesn't conflict with other locks
- Move lock breaker to info callout
- Reorder ephemeral options: temporary slots first, separate IDs second
- Generalize health check warning to cover both K8s and ECS
- Add EFS performance caveat
- Move SQLite/NFS warning to troubleshooting, link from guide
- Add replication slot recreation section to troubleshooting
- Remove redundant "When to use" in ephemeral section
- Fix broken config.md cross-reference after option reorder
- Add rolling upgrade caveat to deployment.md readiness probe section
- Add upgrading cross-reference from sharding.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor Author

@msfstef msfstef left a comment

Choose a reason for hiding this comment

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

Addressed all review points:

  • Overview section added — covers read-only mode, advisory lock concept, and includes the comparison table upfront so readers can self-select their path. Advisory lock section is now lighter.
  • Lock breaker → info callout, advisory lock clarified as not conflicting with other locks in the system
  • EFS discouraged with a performance warning noting it only suits small deployments
  • SQLite/NFS warning → troubleshooting with inline link. Also added a replication slot recreation troubleshooting section explaining full-resync implications, linked from the temporary slots warning.
  • Health check warning generalized to cover both K8s and ECS (not K8s-specific anymore). Also added a caveat to deployment.md's readiness probe section since it recommends exec probes that would deadlock during rolling upgrades.
  • Options reordered: temporary slots first (Option A), separate stream IDs second (Option B). Comparison table columns match.
  • Redundant "When to use" removed from ephemeral section, folded into intro paragraph. Added note that shared-storage platform examples apply here too (minus the volume mount).
  • Fixed broken config.md cross-reference (#option-b#option-a) after the reorder.

msfstef and others added 2 commits April 7, 2026 13:55
- Consolidate temporary slots and separate stream IDs into a single
  "separate storage" strategy (both require sticky sessions, cause 409s)
- Simplify comparison table to shared vs separate storage
- Reframe health check semantics: 200=active, 202=ready
- Replace ECS EFS example with EC2 host volumes + placement constraints,
  mention EFS as alternative with performance caveats
- Move inline troubleshooting to dedicated troubleshooting page
- Fix anchor references after heading renames

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…advice

- Remove deploy.png icon to avoid duplicating deployment guide
- Merge EFS tip and network filesystem bullet into a single warning
  about IO performance on network filesystems
- Remove redundant troubleshooting link from configuration section

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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