azure-service-fabric

host multiple public sites on service fabric

蹲街弑〆低调 提交于 2019-11-27 18:15:36
问题 I have a service fabric cluster deployed with a domain of foo.northcentralus.cloudapp.azure.com It has a single node type with a single public ip address / load balancer. Lets say I have the following two apps deployed: http://foo.northcentralus.cloudapp.azure.com:8101/wordcount/ http://foo.northcentralus.cloudapp.azure.com:8102/visualobjects/ How can I set this up so I can have multiple domains each hosted on port 80? (assuming I own both of these domains obviously) http://www.wordcount.com

How to run a Service Fabric application with different security permissions?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 16:25:21
问题 Service Fabric RunAs feature By default, a Service Fabric application will run with the Network Service account. Microsoft has (partial) documentation on how to run it with other permissions: RunAs: Run a Service Fabric application with different security permissions. Based on this, here's what I'm trying to do: My Service Fabric application calls a library that is being developed in an other repository. When deployed in the cloud, the services will download the binaries for the library from

What would be the best way to search an IReliableDictionary?

亡梦爱人 提交于 2019-11-27 15:48:10
Based on these posts: Convert IReliableDictionary to IList What is the most optimal method of querying a reliable dictionary collection I should be able to use Linq to query an IReliableDictionary, but it would appear that this interface no longer implements IEnumerable and the Linq extensions are not available. At least in version 5.0.0.0 of the Microsoft.ServiceFabric.Data.Interfaces assembly. If this is true, what would be the best way to search an IReliableDictionary? Vaclav Turecek Yes, we did remove IEnumerable from Reliable Collections in the GA release. As Allan T mentions, Reliable

Azure Service Fabric reliable collections and memory

巧了我就是萌 提交于 2019-11-27 10:58:08
问题 Let's say I'm running a Service Fabric cluster on 5 D1 class (1 core, 3.5GB RAM, 50GB SSD) VMs. and that I'm running 2 reliable services on this cluster, one stateless and one stateful. Let's assume that the replica target is 3. How to calculate how much can my reliable collections hold? Let's say I add one or more stateful services. Since I don't really know how the framework distributes services do I need to take most conservative approach and assume that a node may run all of my stateful

Blue/Green Deployments with Azure ServiceFabric

荒凉一梦 提交于 2019-11-27 07:40:53
I'm currently building an application using the ReliableActors framework on Azure ServiceFabric. As we scale up, I'm looking at doing blue/green deployments. I can see how to do this using a stateless system. Is there's a way to do this using statefull actors? Service Fabric is all about rolling upgrades, rather than deployment swaps, like a VIP swap. Both stateless and stateful services are upgraded the same way, but there are a few additional nuances to stateful that I'll mention later. By rolling upgrades, I mean upgrades to an application are done in place, one upgrade domain at a time, so

Default service descriptions can not be modified as part of upgrade set EnableDefaultServicesUpgrade to true

瘦欲@ 提交于 2019-11-27 07:29:10
问题 I am trying to upgrade my Service Fabric application via Visual Studio. I ended up having to use the diff package approach to ensure that only the services I change are in the upgrade. I did this via a command file which removed the non-required files. Now I have walked into another error which is annoying with its lack of detail: Start-ServiceFabricApplicationUpgrade : Default service descriptions can not be modified as part of upgrade. Modified 2>default service: fabric:/MYAPPLICATION

Set up Dependency Injection on Service Fabric using default ASP.NET Core DI container

无人久伴 提交于 2019-11-27 07:27:14
问题 I would like to use ASP.NET Core's default DI container to setup DI for my Service Fabric project. //This is what I've got so far, and it works great ServiceRuntime.RegisterServiceAsync( "MyServiceType", context => new MyService(context, new MyMonitor() ).GetAwaiter().GetResult(); //This is how I use it public MyService(StatefulServiceContext context, IMonitor myMonitor) : base(context) { this._myMonitor = myMonitor; } How would I set up DI, if MyMonitor class has a dependency on a

How can I reach a specific replica of a stateless service

大憨熊 提交于 2019-11-27 07:09:50
问题 I've created a stateless service within Service Fabric. It has a SingletonPartition, but multiple instances (InstanceCount is -1 in my case). I want to communicate with a specific replica of this service. To find all replica's I use: var fabricClient = new FabricClient(); var serviceUri = new Uri(SERVICENAME); Partition partition = (await fabricClient.QueryManager.GetPartitionListAsync(serviceUri)).First(); foreach(Replica replica in await fabricClient.QueryManager.GetReplicaListAsync

How to add message header to the request when using default client of Azure service fabric?

最后都变了- 提交于 2019-11-27 04:51:14
I am wondering it is possible to inject custom message header to outgoing request to carry additional information without deserialize the payload to fullfill the functionality like authentication, validation or correlation of request like wcf provided by means of messagesinspector? Update With SDK v2 you can now (relatively) easily modify the headers of both Reliable Services and Actors. Note in the examples below some wrapper members were omitted for brevity. Client We use ServiceProxyFactory to create proxies instead of the static ServiceProxy . Then we can wrap IServiceRemotingClientFactory

How to configure SSL on a self hosted Web API in Azure Service Fabric

爱⌒轻易说出口 提交于 2019-11-27 03:41:34
问题 I have followed this article to setup an OWIN self hosted Web API within an Azure service fabric stateless service. I also found this article which describes setting up an HTTPS endpoint within an Azure service fabric service. ... <Certificates> <EndpointCertificate Name="TestCert1" X509FindValue="FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0" X509StoreName="MY" /> </Certificates> ... How do I configure the SSL certificate for my WebAPI service within service fabric? When I