orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Observer Subscription Scalability issues

Open ponsakthi opened this issue 10 years ago • 3 comments

I have a requirement to store close to 1000 observers in grain state of publisher grain. But publisher grain fails to write to state with an error "Data too large to write to Azure Storage" when observer count is ~450. The grain state is as follows

 public class PublisherGrainState : GrainState
    {
        public ObserverSubscriptionManager<INotificationObserver> Observers { get; set; } 
    }

I switched to Streams and I still see the same issue when the observer count ~350.

Is there any guidelines to support such large number of observers?

ponsakthi avatar Jan 04 '16 15:01 ponsakthi

This is the limitation of the current implementation of the Azure Table storage provider that stores all of the grain state into a single column. We are planning to bring a more sophisticated implementation of it to GitHub in the near future.

In the meantime, the workaround is to use a different storage provider or to manage persistence of the subscribers list with app code in the grain.

sergeybykov avatar Jan 04 '16 16:01 sergeybykov

Same issue was raised in https://github.com/dotnet/orleans/issues/1217.

gabikliot avatar Jan 05 '16 04:01 gabikliot

Will be fixed by https://github.com/dotnet/orleans/pull/1539.

gabikliot avatar Mar 12 '16 06:03 gabikliot