Goal: Prevent scaling up if the host system is already under heavy load.
The pool currently scales based on queue utilization. To improve safety, we should integrate system-level monitoring.
Workers should only scale up if the host machine has sufficient CPU and Memory available, preventing the pool from starving other processes.
- Integrate a system monitoring check inside
checkScaling().
- Check CPU utilization and Resident Set Size (RSS) memory.
- Auto scale if system is under heavy load
Goal: Prevent scaling up if the host system is already under heavy load.
The pool currently scales based on queue utilization. To improve safety, we should integrate system-level monitoring.
Workers should only scale up if the host machine has sufficient CPU and Memory available, preventing the pool from starving other processes.
checkScaling().