Azure Service Fabric - 创建客户端应用程序服务
客户端应用程序服务应该能够向 NCache 用于获取 IP 地址的 Azure Service Fabric 发现服务 NCache Service Fabric 群集中可用的服务器。 为此,您必须提供服务发现服务的 Service Fabric URL,在我们的例子中是 http://ncachesfcluster.southeastasia.cloudapp.azure.com:55100. 这与创建的缓存 ID 一起 NCache 客户端应用程序可以使用集群来创建用于访问 NCache 簇。
Azure Service Fabric:用于创建客户端应用程序服务的服务清单文件
下面给出的是演示客户端应用程序访问的 Azure Service Fabric 服务清单文件 NCache 簇:
<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest Name="ClientContainerPkg"
Version="1.0.0"
xmlns="http://schemas.microsoft.com/2011/01/fabric"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ServiceTypes>
<StatelessServiceType ServiceTypeName="ClientContainerType" UseImplicitHost="true" />
</ServiceTypes>
<CodePackage Name="Code" Version="1.0.0">
<EnvironmentVariables>
<EnvironmentVariable Name="CacheID" Value="democache"/>
<EnvironmentVariable Name="ServiceDiscoveryUrl" Value="http://ncachesfcluster.southeastasia.cloudapp.azure.com:55100"/>
</EnvironmentVariables>
<EntryPoint>
<ContainerHost>
<ImageName>ncache/apps:sfclient</ImageName>
</ContainerHost>
</EntryPoint>
</CodePackage>
</ServiceManifest>
参见
创建 Azure Service Fabric 集群
创建 NCache 集群服务
监控缓存集群和客户端
在运行时添加缓存服务器