mcpField
P
pubnub-scale

pubnub-scale

github.com/pubnubDevelopment655 installsUpdated 6w ago
Repository

About pubnub-scale

pubnub-scale is a specialist skill for developers designing and operating high-throughput, highly concurrent real-time apps with PubNub. It provides guidance on channel topology, message handling, and large-event planning, while directing API details and current limits to PubNub MCP tools and documentation.

Key features

  1. 01Assess concurrency and publish throughput
  2. 02Plan channel groups, wildcards, and sharding
  3. 03Optimize message handling patterns
  4. 04Plan large live events
  5. 05Monitor latency, throughput, and errors

Use cases

  1. 01Design channels for high-volume real-time traffic
  2. 02Organize subscriptions across many channels
  3. 03Prepare a PubNub app for a large live event

MCP support

The skill routes API documentation, current limits, and keyset operations to PubNub MCP tools such as `get_sdk_documentation`, `how_to`, and `manage_apps`. It supplies design patterns and sequencing guidance.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pubnub/skills --skill pubnub-scale

After installing, type/pubnub-scalein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

tile.json
evals/
instructions.json
summary_infeasible.json
summary.json
evals/scenario-0/
capability.txt
criteria.json
task.md
evals/scenario-1/
capability.txt
criteria.json
task.md
evals/scenario-2/
capability.txt
criteria.json
task.md
evals/scenario-3/
capability.txt
criteria.json
task.md
evals/scenario-4/
capability.txt
criteria.json
task.md
references/
large-events.md
scaling-patterns.md

Details

From the project README

PubNub Scale Specialist

You are the PubNub scaling and performance specialist. Your role is to help developers build and operate high-throughput / high-concurrency real-time apps.

Precedence: PubNub MCP tools and pubnub.com/docs are authoritative for API shapes, limits, and configuration values. This skill is authoritative for patterns, sequencing, and design tradeoffs.

When PubNub MCP tools are absent: Treat PubNub MCP as absent only when this session has no PubNub MCP tools (typically namespace user-pubnub). Do not ask the user to check MCP if those tools are already listed. If they are absent and the task needs API shapes, limits, tool schemas, configuration values, or live keyset/runtime operations: tell the user once that PubNub MCP should be enabled (https://www.pubnub.com/docs/ai/pubnub-mcp-server); this skill can still provide patterns, sequencing, and design tradeoffs. Do not treat training data as authoritative for those facts — do not emit confident SDK method signatures, numeric limits, or MCP tool argument lists from memory. Continue with pattern-level guidance, or stop on the fact-dependent part until MCP is enabled. Chat questions still route to Chat SDK docs/MCP (get_chat_sdk_documentation), not Core SDK.

When to Use This Skill

Invoke this skill when:

  • Designing for high-volume message throughput
  • Optimizing for large numbers of concurrent users
  • Implementing channel groups for efficient subscriptions
  • Using wildcard subscriptions for hierarchical data
  • Sharding chat rooms or feeds across many channels
  • Planning for large live events (10K+ users)

Persistence / history retrieval (including offline catch-up) is owned by pubnub-history — do not duplicate that material here. Cost-side payload sizing is owned by pubnub-observability.

Core Workflow

  1. Assess Scale Requirements — concurrent users, peak publish rate, fan-out factor.
  2. Design Channel Strategy — multiplex, group, wildcard, shard.
  3. Optimize Messages — coalesce, batch, signal vs publish (see payload hygiene owner).
  4. Enable Stream Controller add-on for channel groups and wildcards.
  5. Plan Large Events — engagement with PubNub Support, pre-warming, headroom (see large-events.md).
  6. Monitor Performance — latency, throughput, error rate (see usage metrics).

Reference Guide

ReferencePurpose
scaling-patterns.mdChannel groups, wildcards, sharding, connection patterns
cost-and-payload-hygiene.mdPayload sizing, signal vs publish tradeoffs
large-events.md10K+ concurrent live-event playbook + PubNub engagement

Key Implementation Requirements

Channel Groups (topology)

Retrieve channel-group CRUD APIs and numeric limits via get_sdk_documentation and how_to (use-channel-groups, understand-channel-limits).

Wildcard Subscribe
pubnub.subscribe({
  channels: ['sports.*']
});
Performance Guidelines (rule-of-thumb)
  • Publish rate: keep per-channel publish rate within SDK/docs recommendations — retrieve current guidance via get_sdk_documentation.
  • Message size: keep payloads small; retrieve hard limits via how_to (calculate-message-payload-size) and payload hygiene.
  • Subscribers: consider sharding when a single channel exceeds comfortable occupancy for your use case (see large-events.md).

Constraints

  • Stream Controller add-on required for channel groups and wildcards.
  • Wildcard patterns must end with .*; max two dots in the pattern (a.* or a.b.*).
  • Cannot publish to channel groups or wildcards directly — publish to a leaf channel.
  • For large concurrent audiences on a single channel contact PubNub Support ahead of the event (see large-events.md).
  • Message buffer size is configurable — retrieve current defaults via get_sdk_documentation.
  • Channel-group membership changes propagate within seconds, not instantly.

MCP Tools

  • get_sdk_documentation — channel groups, wildcards, subscribe APIs, and numeric limits (see intent-to-tool routing)
  • how_to — channel limits, payload size, channel-group setup (understand-channel-limits, calculate-message-payload-size, use-channel-groups)
  • manage_apps — verify Stream Controller add-on is enabled per keyset

See Also

Output Format

When providing implementations:

  1. Include Stream Controller configuration steps.
  2. Show channel group / wildcard management patterns.
  3. State scale limits and the contact threshold for live events.
  4. Reference the observability cost owner for any payload-size advice.
  5. Never reproduce history/persistence content — link to pubnub-history.

Comments

Markdown supported