dfinity avatar

Multi Canister

If you're building on the Internet Computer and need to split your app across multiple canisters, this covers the architecture patterns and gotchas that matter. It walks through inter-canister calls, the 2MB payload limit, why update methods aren't atomic across awaits, and how to avoid reentrancy bugs. The guidance on bounded versus unbounded waits and cross-subnet latency is solid. This is written for engineers who already understand single-canister apps and need to scale up or separate concerns. The pitfall list is thorough, especially around idempotent APIs and defensive caller binding in Rust. Skip this if your app fits in one canister.

skills.sh installs
300
GitHub stars
39
last updated
Aug 21, 2026

Install

$ npx -y skills add dfinity/icskills --skill multi-canister --agent claude-code

Installs into .claude/skills of the current project.

Files

Multi-Canister Architecture

What This Is

Splitting an IC application across multiple canisters for scaling, separation of concerns, or independent upgrade cycles. Each canister has its own state, cycle balance, and upgrade path. Canisters communicate via async inter-canister calls.

Prerequisites

  • For Motoko: mops package manager, core = "2.1.0" in mops.toml — Runtime.envVar, used below to discover a sibling canister's ID, was added in motoko-core 2.1.0
  • For Rust: ic-cdk >= 0.19, candid, serde, ic-stable-structures

How It Works

A caller canister makes a call to a callee canister: the method name, arguments (payload) and attached cycles are packed into a canister request message, which is delivered to the callee after the caller blocks on await; the callee executes the request and produces a response; this is packed into a canister response message and delivered to the caller; the caller awakes fron the await and continues execution (executes the canister response message). The system may produce a reject response message if e.g. the callee is not found or some resource limit was reached.

Sponsors

Details

Repository
github.com/dfinity/icskills
Categories
Backend & APIs, DevOps & CI/CD, Release Management, Design & UI/UX
First seen
Jun 3, 2026

More from dfinity/icskills

All 16
1incept5 avatareve-bootstrapincept5/eve-skillpacksFull onboarding flow — detects auth state, handles access requests for new users, and sets up project for all users.300skills.sh installs
2casper-studios avataryoutube-toolscasper-studios/casper-marketplaceFree YouTube video downloading, transcript extraction, and metadata retrieval using yt-dlp. Use this skill for downloading YouTube videos (single or bulk), extr298skills.sh installs
3omer-metin avatarcybersecurityomer-metin/skills-for-antigravitySecurity engineering that protects applications, data, and users from real-world threatsUse when "security, authentication, authorization, encryption, OWASP, vu298skills.sh installs
4cinience avataralicloud-data-lake-dlf-next-testcinience/alicloud-skillsMinimal smoke test for DlfNext skill. Validate metadata discovery and one read-only API call.297skills.sh installs
5wsimmonds avatarnextjs-pathname-id-fetchwsimmonds/claude-nextjs-skillsFocused pattern for fetching data using URL parameters in Next.js. Covers creating dynamic routes ([id], [slug]) and accessing route parameters in server compon296skills.sh installs
6xiaolai avatartiptap-editorxiaolai/vmarkTiptap editor API patterns for vmark WYSIWYG development. Use when working with editor commands, node traversal, selection handling, or format operations.296skills.sh installs