0

How can we report a metric load on specific replicas for stateful services and on specific instances for stateless services. For example, stateless service with 5 instances, I want to report a metric load for instance 1 only, not affecting instances 2, 3, 4 and 5.

Based on documentation we can report metric loads at a partition level: IServicePartition.ReportLoad(IEnumerable)

Example: this.Partition.ReportLoad(new List { new LoadMetric("CurrentConnectionCount", 1234) });

Thanks

Erick B
  • 478
  • 5
  • 11
  • Maybe you can add an if statement based on the current node information? "context.NodeContext.NodeName" Or use application insights TrackMetric. – Thieme Apr 20 '18 at 19:32

1 Answers1

0

Report them on all nodes (i.e. dont alter the reporting code) but don't use the metrics for load balancing on the nodes where you don't care.

Fourth
  • 9,163
  • 1
  • 23
  • 28