My stateless service receives tasks from Service Bus queue and processes it. I'm trying now to find an optimal way to use resources of Service Fabric node as much as possible. So I see 2 approaches: 1) create several threads inside the service 2) create several instances of the service per node. I consider that the 2nd way is more safe and correct but when I specified InstanceCount = 5 for 1-node cluster I received a warning.
Config.xml
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="fabric:/EmailSenderApp" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<Parameters>
<Parameter Name="MainService_InstanceCount" Value="1" />
...
</Parameters>
</Application>
Error:
Unhealthy event: SourceId='System.FM', Property='State', HealthState='Warning', ConsiderWarningAsError=false.
Partition is below target replica or instance count.
fabric:/EmailSenderApp/EmailSenderMainService 5 1 09916a6b-1701-46ce-a281-0e223a68f980
Ready _Node_0 131708550454646056
(Showing 1 out of 1 instances. Total available instances: 1)