azure-service-fabric

Write to ServiceEventSource from Service Fabric WebAPI controller

北战南征 提交于 2019-12-04 13:05:26
In my Stateful service, I can write to the ServiceEventSource by calling this: ServiceEventSource.Current.ServiceMessage(this.Context, "this is my log message"); Does anyone know how I can make that same call in my Stateless WebAPI controller? It seems like I'm unable to get the context into the controller. I noticed it's only available in my OwinCommunicationListener . Basically, I want to be able to log my controllers like this: public async Task<IHttpActionResult> Get(string id) { ServiceEventSource.Current.ServiceMessage(this.Context, "this is my log message"); //Do something return Ok(100

Service fabric reliable dictionary performance with 1 million keys

大城市里の小女人 提交于 2019-12-04 12:33:40
问题 I am evaluating the performance of Service Fabric with a Reliable Dictionary of ~1 million keys. I'm getting fairly disappointing results, so I wanted to check if either my code or my expectations are wrong. I have a dictionary initialized with dict = await _stateManager.GetOrAddAsync<IReliableDictionary2<string, string>>("test_"+id); id is unique for each test run. I populate it with a list of strings, like "1-1-1-1-1-1-1-1-1", "1-1-1-1-1-1-1-1-2", "1-1-1-1-1-1-1-1-3".... up to 576,000 items

Azure Service Fabric Rollback

心已入冬 提交于 2019-12-04 12:30:54
I have a Service Fabric application. Let's say, version 1.0.0. I deploy an update as version 2.0.0. Everything is good. Later, I want to roll back (or upgrade depending on your perspective) to version 1.0.0. I want to run a simple PS script to rollback. I know similar questions has been asked (in various forms), but no one has provided a solution. It seems like something common which should be trivial to accomplish. I don't need a tutorial on how publish works. I just want some PS script I can run to do the rollback. Running 5.5, I have tried permutations of Start

azure service fabric reliable dictionary linq query very slow

半腔热情 提交于 2019-12-04 10:23:59
I have a reliable dictionary in service fabric stateful service. I have a simple linq expression. I am using Ix-Async package for building an asyncenumerable. using (ITransaction tx = this.StateManager.CreateTransaction()) { var result = (await customers.CreateLinqAsyncEnumerable(tx)) .Where(x => x.Value.NameFirst != null && x.Value.NameFirst.EndsWith(n, StringComparison.InvariantCultureIgnoreCase)) .Select(y => y.Value); return await result.ToList(); } The data is organized into 2 partitions with around 75,000 records in each partition. I am using Int64 range as the partition key. In the

Service Fabric logs consuming all available disk space

拥有回忆 提交于 2019-12-04 08:24:40
I've got a few clusters that have now been running for a month or so and am finding that temporary storage is being entirely gobbled up by Service Fabric log files. On a sweet fleet of F1 VMs where there is only 16GB of local storage I am just about out of space, a few of them are now down to 30MB, yes mega-bytes of storage (where less than 1GB is consumed by my application in all its versions). In looking at the disk usage on the cluster VMs I can see clearly that the SvcFab\Log and SvcFab\ReplicatorLog folders are consuming over 90% of available space. Surely the SF can better handle this.

Application insights and service fabric?

不问归期 提交于 2019-12-04 07:51:21
I found this from several months back on Application Insights and Service Fabric and I'm wondering if there is any new information. I would really like to get CPU, Memory, Storage and other metrics out of service fabric and the reliable actors. Having it presented in a user friendly HUD like app insights provides would be awesome! Thanks! On the azure portal, you can now create a resource called 'Service Fabric Analytics' to create a nice dashboard for your cluster. Configure as cluster like described here . It's OMS based, not Appinsights though. The Service Fabric Solution helps identify and

Service Fabric: are multiple service types allowed in ServiceManifest.xml

ぃ、小莉子 提交于 2019-12-04 07:47:06
I'm trying to register multiple service-fabric services within a single exe (ServiceRuntime.RegisterServiceAsync). Is this supported? If so, how would I configure them? Eg: ServiceManifest.xml supports multiple StatelessServiceType elements within ServiceTypes: <?xml version="1.0" encoding="utf-8"?> <ServiceManifest Name="EchoGatewayPkg" 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="Service1Type" > </StatelessServiceType

Mapping Azure Service Fabric services to a certain node type

谁都会走 提交于 2019-12-04 06:23:25
Creating services (or actors in the case of Reliable Actors) in the Service Fabric application VS template is effortless. Defining node types in the Azure portal is also easy. But how do you map a service/actor to run on a specific node type? You can do that using placement constraints. More information on that can be found in the "Placement constraints and node properties" section of this article. In short, you'd need to set placement properties on your cluster and then set placement constraints on the service using StatefulServiceDescription.PlacementConstraints . Here is declarative way to

Update WadCfg “only” of existing Azure Service Fabric cluster?

那年仲夏 提交于 2019-12-04 04:59:20
问题 I want to monitor Perfomance metrics of a existing Service Fabric Cluster. Here is the link of Performance metrics - https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-diagnostics-event-generation-perf I went through this Microsoft documentation - https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-diagnostics-perf-wad My problem is, The ARM template I downloaded during Service Fabric creation time is quite big and contains lot of params and I don't have the

Service Fabric: Calls between services are delayed?

倾然丶 夕夏残阳落幕 提交于 2019-12-04 04:42:09
We are working on a service fabric application made up of several different services, and a key part of the way our application works is that these services need to call each other in high volumes. We have had no problems until recently when we increased the load on our application and found it massively slowed down. After much investigation and timing various things we found that the issue seems to be that when we are making a lot of calls to one type of service (of which we have several instances), the calls seemed to be some delay between us calling the service, and the service actually