Orleans silo configuration
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.
Orleans client configuration
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).
Povratne informacije
https://aka.ms/ContentUserFeedback.
Stiže uskoro: Tijekom 2024. postupno ćemo ukinuti servis Problemi sa servisom GitHub kao mehanizam za povratne informacije za sadržaj i zamijeniti ga novim sustavom za povratne informacije. Dodatne informacije potražite u članku:Pošaljite i pogledajte povratne informacije za