Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Scale The Sync Server

ASecurity

Scale a realtime sync server: shard by document/room with connection affinity, fan-out ops within a room, offload snapshots to durable storage, bound document growth (tombstone GC + compaction), and enforce access control at the sync boundary. Horizontal scale is more rooms, not a bigger single node.

7 stars
0 votes
0 copies
0 views
Added 9/23/2026
ai-agentsrustgonodetestingperformance

Works with

cli

Security Analysis

A100/100

Scanned 9/23/2026

$npx -y skills add mcorbett51090/RavenClaude --skill scale-the-sync-server --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Scale The Sync Server?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Scale The Sync Server
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mcorbett51090-scale-the-sync-server/badge)](https://www.skillsdirectory.com/skills/mcorbett51090-scale-the-sync-server)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: scale-the-sync-server
description: "Scale a realtime sync server: shard by document/room with connection affinity, fan-out ops within a room, offload snapshots to durable storage, bound document growth (tombstone GC + compaction), and enforce access control at the sync boundary. Horizontal scale is more rooms, not a bigger single node."
---

# Scale the Sync Server

The **room is the shard**. Scale by adding rooms across nodes, not by making one node hold every room.

## The plan

1. **Shard by document/room.** A room (one collaborative document and its participants) is the natural unit of state and concurrency. Route all of a room's clients to the **same node** (connection affinity / consistent routing) so the live state has a single home.
2. **Fan-out within a room.** An incoming op is applied once and broadcast to the room's other members. Presence rides the same room scope on its separate channel.
3. **Add nodes by sharding rooms**, with a routing/affinity layer (a gateway, consistent hashing, or a per-room stateful object). One node owns a slice of the rooms; you scale out by moving rooms, not by replicating one giant room everywhere.
4. **Offload persistence and snapshots to durable storage.** The live node holds the hot state; the op log and periodic snapshots go to a store so a room can be rehydrated, a late joiner can catch up, and a node can fail over.
5. **Bound document growth.** Schedule **snapshots + compaction + tombstone garbage collection**, collecting only history that **every active replica has acknowledged** (the safety condition). Unbounded tombstones are how a long-lived document eventually falls over.
6. **Enforce access control at the boundary.** Who may join a room, edit vs view, and per-op authorization live at the **server edge** where connections terminate — the merge engine trusts that the ops it receives are already authorized.

## Capacity signals to watch

| Signal | Reads | Action |
|---|---|---|
| Connections per node | Fan-out load | Re-shard rooms across nodes |
| Op broadcast latency | In-room responsiveness | Coalesce/throttle; check node saturation |
| Document size over time | Tombstone/history growth | Compaction + GC cadence |
| Reconnect storm behavior | Resilience | Jittered backoff + resume-from-version |

## Anti-patterns

- One node holding every room (no shard key) — a single point of saturation.
- No snapshot offload → cold start and failover replay the full op log.
- Authorizing inside the merge engine instead of at the connection edge.

## See also

- [`../../knowledge/transport-and-topology-decision-tree.md`](../../knowledge/transport-and-topology-decision-tree.md) (topology that this scales).
- Template: [`../../templates/sync-server-scaling-plan.md`](../../templates/sync-server-scaling-plan.md)
- Best practices: [`../../best-practices/bound-document-growth-tombstones-and-snapshots.md`](../../best-practices/bound-document-growth-tombstones-and-snapshots.md), [`../../best-practices/authority-and-access-control-live-at-the-sync-boundary.md`](../../best-practices/authority-and-access-control-live-at-the-sync-boundary.md)
- Seam: latency budgets + load testing → [`../../../performance-engineering/CLAUDE.md`](../../../performance-engineering/CLAUDE.md)

Attribution

mcorbett51090mcorbett51090
View sourceSee grades on GitHubMore from mcorbett51090 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →