azure-service-fabric

How do I configure Service Fabric Placement Constraints?

人走茶凉 提交于 2019-11-30 22:43:27
I want to be able to configure placement constraints based on different node types (i.e. FrontEnd, BackEnd). Can I do this per-environment, so that in my test/local cluster there are no constraints, but on my production environments there is? aoetalks Yes, you can! The official docs describe a way to do this via code, but you can also do so with the service manifest files directly to get default & per-environment configuration. There is a blog post you can follow (found it in this answer ). 来源: https://stackoverflow.com/questions/40558124/how-do-i-configure-service-fabric-placement-constraints

The primary or stateless instance for the partition has invalid address

僤鯓⒐⒋嵵緔 提交于 2019-11-30 21:51:38
问题 I created a stateful service with the out-of-the-box partitioning: <StatefulService ServiceTypeName="ExamplesServiceType" TargetReplicaSetSize="[ExamplesService_TargetReplicaSetSize]" MinReplicaSetSize="[ExamplesService_MinReplicaSetSize]"> <UniformInt64Partition PartitionCount="[ExamplesService_PartitionCount]" LowKey="-9223372036854775808" HighKey="9223372036854775807" /> </StatefulService> The service manifest sets the params to (out-of-the-box as well): <Parameter Name="ExampleService

Environment variables not being used when debugging through a Service Fabric project

妖精的绣舞 提交于 2019-11-30 21:31:18
When creating an ASP.NET Core app an environment variable called ASPNETCORE_ENVIRONMENT=Development will be set for you and when debugging you will see that the IHostingEnvironment is set to Development . The problem is that when I use the same project in a solution set up for Service Fabric the environment variables don't seem to get injected and IHostingEnvironment just returns "Production". How can I resolve this? Note: I've set a breakpoint in the startup class to observe the IHostingEnvironment variable. Reference for this answer: https://docs.microsoft.com/en-us/azure/service-fabric

Service Fabric with Generic Services

安稳与你 提交于 2019-11-30 21:30:58
I am looking to have a generic type service ie - public interface IFooService<T> { Task<T> Get(int id); } However, service fabric does not allow generic classes or generic methods. I have also tried something like public interface INinjaService : IService, IFooService<SuperNinja> { } but it does not pick up inherited interfaces stating The service type 'Omni.Fabric.Services.NinjaService' does not implement any service interfaces. A service interface is the one that derives from 'Microsoft.ServiceFabric.Services.Remoting.IService' type. I can't seem to find any reference to generics on Service

WebJob SDK not working when running in a Service Fabric application

痞子三分冷 提交于 2019-11-30 21:12:38
I want to use the WebJob SDK in a stateless service running as a Service Fabric application. Unfortunately I’m not able to get it running properly. Below is part of a test code that reproduces the problem. The “ProcessMethod“ is never invoked. The triggered function “ProcessNotificationsInQueue“ is also never executed (yes, there are items in the queue). The “Health State” of the application is set to “Error” in the Service Fabric Explorer although the application is still running. The DashboardConnectionString and StorageConnectionString both have the correct values. I don’t see any problem

Advantages of Service Fabric Microservices vs Collection of Azure Cloud services/web apps

久未见 提交于 2019-11-30 20:55:44
I have a application that can be broken down into multiple communicating services. My current implementation is monolithic and I want to reorganize it so that individual components can be deployed,iterated upon, scaled independently. I see two ways to do this with Azure: Service Fabric service composed of set of communicating micro-services (stateless, web-api etc.) A collection of individual Azure Web Apps/ Cloud Services that call each other at the http end points. Are there any obvious advantages of 1 over 2? Any rule of thumb to chose one over the other would also be very helpful. Peter

Service Fabric Stateless Server Custom UDP Listener

百般思念 提交于 2019-11-30 20:37:44
问题 We are trying to define a Service Fabric Stateless Service which listeners for UDP data. We are working with Microsoft who have said that it IS supported and that I should set up for TCP; below is the snippet from the ServiceManifest.xml file : <Resources> <Endpoints> <!-- This endpoint is used by the communication listener to obtain the port on which to listen. Please note that if your service is partitioned, this port is shared with replicas of different partitions that are placed in your

Service Fabric System.BadImageFormatException

人走茶凉 提交于 2019-11-30 20:33:49
I downloaded the latest version of Service Fabric SDK 2.4.164 and try to create a new simple stateless service. Build succeeded but when I run it to debug I got: An unhandled exception of type 'System.BadImageFormatException' occurred in Unknown Module. Additional information: Could not load file or assembly 'System.Fabric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format. What is the problem? Please help to solve that. Let me know if I have to add more informations Azure Service Fabri

Azure Service Fabric join Virtual network

安稳与你 提交于 2019-11-30 19:57:01
问题 Is it possible to join a Azure Service Fabric Cluster to a Virtual Network in Azure ? Not simply join an existing Virtual Network, but also join the vm's where the cluster is running on into the domain. So that the cluster can use an domain user account to access network shares etc.. 回答1: Yes. The default SF template creates a VNET for the cluster, so I assume you mean join to an existing VNET. If you take a look at the sample template for SF, you can see the subnet0Ref variable which is

A Service Fabric Cluster in azure that is only accessible through a VPN gateway

浪尽此生 提交于 2019-11-30 19:41:51
问题 I wonder if it is possible to set up an unsecured Service Fabric Cluster that will only be accessible via a VPN Gateway (and not to the public internet). We currently have an unsecured on-premises cluster that we want to move into the cloud. A new resource set for the cluster is created with a load balancer that has a public IP address that cannot be changed. Is there a way to create the cluster with a load balancer with a non-public ip? 回答1: This can be achieved with an internal load