Skip to content

Orleans runtime architecture

The implementation track explains how Orleans realizes the virtual actor model for runtime contributors, provider authors, and operators who reason about failure, consistency, scheduling, and extensibility. The conceptual and task-oriented sections provide application programming guidance.

The pages in this track use Orleans source and tests as the specification. Internal type names let readers follow an operation through the repository. Public APIs and explicitly identified extension points carry compatibility contracts.

An application call enters through generated proxy code, becomes a Message, and is routed by the grain directory and placement services. MessageCenter delivers it locally or through a Connection managed by ConnectionManager. The target Catalog resolves an activation, where ActivationData admits the request and WorkItemGroup executes one synchronous turn at a time. Responses travel back through the same messaging and callback pipeline.

The runtime is intentionally layered:

Rendering diagram.

Use this runtime map and the following topic list to choose the required depth. The runtime architecture page follows the normal call path; the messaging, serialization, reminder, transaction, and version-skew pages explain the boundaries where failure, persistence, and rolling upgrades change the guarantees.

  • Lifecycle implementation describes ordered startup and shutdown.
  • Serialization and code generation covers generated codecs, proxies, manifests, wire identity, and custom components.
  • Reminders explains ring ownership, durable reminder rows, refresh, and tick delivery.
  • Transactions explains transaction agents, managers, participant queues, and recovery decisions.
  • Rolling version skew connects interface version manifests, compatibility directors, selectors, and wire compatibility during mixed-version operation.
  • Persistent streams explains pulling agents, queue ownership, caches, cursors, pub-sub, and recovery.
  • Provider authoring describes named providers, configuration binding, lifecycle participation, and validation.
  • TestingHost architecture explains the in-process cluster harness and its substitutions for production services.
ConcernDefault
PlacementResourceOptimizedPlacement
Grain directoryLocalGrainDirectory, using the membership ring
Experimental directoryOpt-in with CoreHostingExtensions.AddDistributedGrainDirectory; warning ORLEANSEXP003
Experimental directory partitionsGrainDirectoryOptions.PartitionsPerSilo defaults to 1
Membership probe timeout5 seconds
Death-vote expiry2 minutes
MessagingOptions.ResponseTimeout30 seconds, or 30 minutes while a debugger is attached
Automatic call retry after response timeoutNone

Configuration values affect failure detection and resource use. This track explains their role in protocols, while the hosting configuration guide and deployment guidance own operational recommendations.

For the application mental model, start with Orleans overview. For task-oriented recipes that apply these components, use the how-to guide index; for public type contracts, use the C# API reference.