Binu Vijayan
Binu Vijayan

Reputation: 803

Service Fabric Reliable Collection Capacity

In some Service fabric application samples Ref: https://github.com/Azure-Samples/service-fabric-dotnet-iot, It check for the number items currently present in the collection , something like

if(currentNumberOfBufferedWorkItems >= m_MaxNumOfBufferedWorkItems)
        {
            throw new InvalidOperationException($"Work Manger is at maximum buffered work items:{currentNumberOfBufferedWorkItems}");
        }

The current value for m_MaxNumOfBufferedWorkItems is 10000

What are the factors needed to be considered for setting the Maximum Buffer value for the Reliable collection?

Upvotes: 1

Views: 1041

Answers (1)

LoekD
LoekD

Reputation: 11470

In the provided example, they use a queue to buffer items to be processed later. They check the item count to limit the size of the buffer. This is by choice, not limited by the collection itself. The size of the reliable collection is limited only by disk space on the nodes.

The buffer limit in this example should be determined by the processing capacity. If the buffer grows out of control you'd need to add more processing power.

Upvotes: 3

Related Questions