question

RamuSangabathula-7198 avatar image
0 Votes"
RamuSangabathula-7198 asked ·

can we auto scale stateless service based on connection count

We have stateless service deployed in service fabric need to auto scale.

we have requirement to create new service instance every time when connection count to the service reaches a threshold(per say 10000 requests/connections), need to spawn a service instance. Do we have any pre-defined metric we can use to auto scale the service like servicefabric:/_MemoryInMB, or is it going to be a custom metric we have to create, if it is custom metric then in stateless service how can I keep the count of number of connections/requests made to the service so that I can report the load to service Fabric.

Any help greatly appreciated.

Thanks, Ramu Sangabathula

service-fabric-standaloneazure-service-fabric
· 2
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I think we dont have a predefined metric for connection count.

But you can add that as a additional metric in the service and report the metrics periodically.

You can report the custom metric to the cluster as shown here in this document. A sample is shown below.

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

0 Votes 0 · ·

@jakaruna-MSFT

Thanks for responding.., I know we can report load on a metric to service fabric., but part of my question is if this is custom metric then for stateless service how do I keep track of connection count.

Thanks, Ramu Sangabathula

0 Votes 0 · ·

0 Answers