Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
To get a quick overview, we show all relevant configuration parameters (including optional ones) in XML syntax below:
<?xml version="1.0" encoding="utf-8"?>
<OrleansConfiguration xmlns="urn:orleans">
<Globals>
<MultiClusterNetwork
ClusterId="clusterid"
DefaultMultiCluster="uswest,europewest,useast"
BackgroundGossipInterval="30s"
UseGlobalSingleInstanceByDefault="false"
GlobalSingleInstanceRetryInterval="30s"
GlobalSingleInstanceNumberRetries="3"
MaxMultiClusterGateways="10">
<GossipChannel Type="..." ConnectionString="..."/>
<GossipChannel Type="..." ConnectionString="..."/>
</MultiClusterNetwork>
<SystemStore ServiceId="some-guid" />
</Globals>
</OrleansConfiguration>
var silo = new HostBuilder()
.UseOrleans(builder =>
{
builder.Configure<ClusterInfo>(options =>
{
options.ClusterId = "us3";
options.ServiceId = "myawesomeservice";
})
.Configure<MultiClusterOptions>(options =>
{
options.HasMultiClusterNetwork = true;
options.DefaultMultiCluster = new[] { "us1", "eu1", "us2" };
options.BackgroundGossipInterval = TimeSpan.FromSeconds(30);
options.UseGlobalSingleInstanceByDefault = false;
options.GlobalSingleInstanceRetryInterval = TimeSpan.FromSeconds(30);
options.GlobalSingleInstanceNumberRetries = 3;
options.MaxMultiClusterGateways = 10;
options.GossipChannels.Add(
"AzureTable",
"DefaultEndpointsProtocol=https;AccountName=usa;AccountKey=...");
options.GossipChannels.Add(
"AzureTable",
"DefaultEndpointsProtocol=https;AccountName=europe;AccountKey=...")
});
});
As usual, all configuration settings can also be read and written programmatically, via the respective members of the GlobalConfiguration class.
The GlobalConfiguration.ServiceId is an arbitrary ID for identifying this service. It must be the same for all clusters and all silos.
The Orleans.Runtime.MultiClusterNetwork section is optional—if not present, all multi-cluster support is disabled for this silo.
The required parameters ClusterId and GossipChannels are explained in the section on Multi-Cluster Communication.
The optional parameters MaxMultiClusterGateways and BackgroundGossipInterval are explained in the section on Multi-Cluster Communication.
The optional parameter DefaultMultiCluster is explained in the section on Multi-Cluster Configuration.
The optional parameters UseGlobalSingleInstanceByDefault, GlobalSingleInstanceRetryInterval, and GlobalSingleInstanceNumberRetries are explained in the section on Global-Single-Instance Grains.
No extra configuration is required for Orleans client. The same client may not connect to silos in different clusters (the silo refuses the connection in that situation).
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Build your first Orleans app with ASP.NET Core 8.0 - Training
Learn how to build cloud-native, distributed apps with Orleans.