Drools Horizantal Scaling

40 views
Skip to first unread message

MARPINA BHARANI

unread,
Apr 1, 2024, 6:55:40 AMApr 1
to Drools Setup

We have an existing Drools application that receives facts and executes rules. As we aim to scale the application to handle a minimum of one million requests per second, we are seeking guidance on the recommended approaches for horizontal scaling in light of the deprecation of Business Central in the latest version of Drools. Additionally, it is crucial for our application to support temporal rules while scaling.

To provide some context, our main requirements for scaling the Drools application are as follows:

i) Scalability: The application should be able to handle a minimum of one million requests per second. We are looking for strategies to distribute the workload across multiple instances effectively.

ii) Temporal Rule Support: The application should support temporal rules, ensuring that time-based conditions and constraints are correctly evaluated while scaling horizontally.

Considering these requirements, we kindly request your expertise and advice on the recommended approaches and best practices for horizontally scaling a Drools application.

We have tried to have multiple instances, while passing the data to different instances, we could reduce the workload, but this will fail for temporal rules.

Richard Bourner

unread,
Apr 2, 2024, 7:09:52 PMApr 2
to Drools Setup
The fact that Business Central is being retired has no impact on you need of scalability, since Business Central is not a tool for execution.
If your rules have temporal operators in the Complex Event Processing (CEP) sense (i.e are correlating events over time and not just comparing with date/time), then scalability is a challenge because of the statefulness of the approach. 
You can either keep all your sessions sync by making sure that all the working memory of these sessions are the same across all your nodes at all time, or you can use an external memory (using a shared cache for instance) which will be used/referenced by your rules.  
There are pros and cons for both approaches, depending on your requirements and SLAs.
For both approaches, there is custom work though, and this feature/capability is not part of Drools out-of-the-box as it requires additional work to support your scalability need in a stateful context.

Reply all
Reply to author
Forward
0 new messages