Production deployment - horizontal scaling #330
Replies: 1 comment
-
@rossmcphee I don't think you necessarily need the session to be serializable to scale out your NRules-based application. But you can still scale out, though the solution would greatly depend on what it is you actually want to scale here. In other words, it depends on the aspect of your application that is growing.
From your description, it sounds like it's the 3rd case. The best way to approach this case, is to host the rules session in a separate service, and have a farm of these services, where different requests go to different instances. Each instance would have a copy of a session, and as facts change in the world, those changes are communicated to all those instances (e.g. via some broadcast messaging mechanism) and applied to all sessions. This way you get both, the resiliency (if some instances die, you can still handle requests) and the performance (you distribute the load across many instances, and if you have more load, you can add more instances). So, to summarize, the session itself cannot be scaled out. But you can duplicate or partition it in the same service or across a server farm. But it all depends on your concrete scenario. |
Beta Was this translation helpful? Give feedback.
-
We have implemented a NRules based calendar application that uses ISessions. Having built the ISession we use it to test how changes that users make on the UI affect the compliance of the resultant calendar to coverage rules.
Management have demanded that the application should scale horizontally under load. However, since the ISessions are all stored in memory, the only alternatives I can see that would allow the application to support outward scaling are:
Have I missed any other alternatives?
Has anyone got scaling out to work with NRule Session?
Are you considering adding Session serialisation or any other mechanism that would support scaling out?
Beta Was this translation helpful? Give feedback.
All reactions