MODULE 08 · LESSON 8.2
Choose Orleans clustering and persistence
Choose cluster membership and runtime storage independently of application features.
Lesson 44 of 86 · FabrCore 2.0
Overview
Orleans providers determine membership, grain persistence, streams and reminders. The main feature connection selects SQL-backed knowledge/ACL services. An explicit Azure/custom Orleans provider can coexist with the feature database; choosing only a SQL Orleans provider does not enable every SQL feature.
Membership, state and reminders serve different jobs
Clustering determines how silos find one another. Storage retains grain state. Reminder storage retains scheduled registrations. A provider choice can cover several of these concerns, but each has its own configuration and connectivity requirements. All silos in one intended cluster need compatible identifiers and provider settings.
Operational SQL features are separate
An Azure Orleans provider can persist runtime state while a SQL feature connection supplies ACL and knowledge services. Conversely, selecting SQL storage only for Orleans does not activate every SQL Host feature. Draw these stores separately in the deployment plan so backing up a grain store is not mistaken for backing up protected connection grants or the knowledge database.
Choose Orleans providers explicitly
- Choose Localhost, integrated SQL, optional FabrCore.Host.AzureStorage or a custom provider. Set consistent ClusterId and ServiceId for members of the same cluster.
- Configure required named storage, stream and reminder providers. Use the post-provider customization hook for targeted overrides instead of double-registering competing defaults.
- Restrict cluster network access to trusted hosts and test a second silo plus recovery. Use provider-neutral backend client setup only where direct cluster access is intended.
{
"FabrCore": {
"Orleans": {
"ClusterId": "prod",
"ServiceId": "fabrcore",
"ClusteringMode": "AzureStorage",
"ConnectionString": "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net",
"StorageConnectionString": "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net"
}
}
}
{
"FabrCore": {
"Orleans": {
"AzureStorage": {
"GrainStorage": "Blob", // Blob (default) | Table
"ContainerName": "fabrcore-grainstate",
"Streams": "AzureQueue", // AzureQueue (default) | Memory
"StreamQueueCount": 8 // must match across all silos
}
}
}
}
builder.AddFabrCoreServer(new FabrCoreServerOptions()
.ConfigureOrleans(orleans =>
orleans.UseTls(/* Host certificate and client-certificate validation */)));
Verify the actual selected providers
- Start a staging Host with the intended explicit provider configuration and inspect its startup/provider diagnostics. Compare cluster/service identifiers with the other silos you intend it to join.
- Write and reload one state value through a restart. If testing reminders, test their provider separately rather than inferring reminder durability from an agent-state read.
- Inspect feature capabilities and database readiness independently of Orleans membership. Document which store contains each kind of application and operational data.
The outcome is a verified provider map. “Uses Azure” or “uses SQL” alone is too broad to explain where a particular record survives.
If the result is different
Different ServiceId or ClusterId values create separate logical runtimes. Do not expose Orleans membership or storage credentials to the MAUI client.
Go deeper
Explore the related documentation.