Hi there,
I am wondering. We are using BPTs for lending. When doing the stress test, the third party tried 1000 application launched per minute. It means there should be 1000 BPT instances to create. Regarding to BPT threads/process there is a limit 10 threads per front-end server.
My question is how the best practice so i can pass this stress test?
regards and thanks
Hello @IQ78 ,
Here are some listed best Practices to handle the heavy BPT-:
1. Understand BPT Thread Limits
2. Design Efficient BPT Flows
3. Offload Heavy Work to Timers
4. Use a Scalable Architecture
5. Clean Up and Monitor
Let me know if more clarification is needed.
Best Regards,
Vibhor Agarwal
Hi thanks,
I still don't understand about the BPT Thread Limits. Suppose I create a BPT and there are 25 applications. When each BPT launch, does it create all activities first? And what thread limits it is?
regards
OutSystems allows 10 concurrent BPT threads per front-end server. However, this doesn't mean only 10 processes can run. If a process reaches a wait state (e.g., human activity or timer), it releases the thread, allowing others to execute.
Warm Regards,
Vibhor
To handle stress tests effectively where you need to manage the creation of 1000 BPT instances per minute, you need to plan carefully and optimize the way processes are handled in your OutSystems app. Based on best practices, here are the strategies to optimize BPT performance to pass your stress test:
Instead of pushing 1000 BPT instances directly to the OutSystems BPT queue, implement a throttling mechanism to control how many instances are created and executed simultaneously. You can introduce an intermediate queue to manage tasks and progressively push instances to the platform based on the available capacity. This prevents infrastructure overload and maintains stability. Refer to an example of how throttling can be implemented in the article "Advanced Techniques for Performance Tuning and Optimization in Enterprise Apps" Advanced Techniques for Performance Tuning and Optimization in Enterprise Apps.
If your processes do not depend on long-running workflows or significant persistence of state, consider splitting workload processing into smaller tasks and using Light BPT processes. Light BPTs allow for asynchronous processing and enable up to 20 threads per front-end server, offering better parallelization for high-throughput scenarios Light BPT vs BPT threads.
Implement a prioritization mechanism within your intermediate queuing system. For example, classify each process as high-priority, medium-priority, and low-priority based on business needs. This ensures that critical processes are always handled first without delays, while secondary ones are processed gradually Advanced Techniques for Performance Tuning and Optimization in Enterprise Apps.
Since each Automatic Activity in the process has a timeout of 5 minutes, ensure that these activities are designed to handle tasks efficiently within this window to avoid bottlenecks or delays BPT Time Limit.
If possible, consider scaling your infrastructure by adding more front-end servers, which will proportionally increase the available thread count for both BPTs and Light BPTs. For example, doubling your servers from 1 to 2 would increase BPT thread capacity from 10 to 20.
Regularly purge and archive completed BPT data to prevent your database from bloating and slowing down during high-load scenarios. Keeping the primary tables light ensures faster processing and retrieval of active data Advanced Techniques for Performance Tuning and Optimization in Enterprise Apps.
Instead of one large transaction, split operations into smaller chunks to process tasks incrementally. For instance, divide the 1000 applications into batches and process them gradually using timers or Light BPTs in parallel.
By implementing a combination of these techniques, you can achieve better performance and scalability while still meeting stress test requirements. If Light BPTs can replace regular BPTs for part of the process, favor them for higher throughput without hitting thread limits.