-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Hey @walkor, thank you for you work! I`ve been worknig with workerman for like 5 years already
Long story short: is it possible to sclae up/down worker count from child process?
Currently i'm working on a project based on workerman in kubernetes. With some minor tricks it works great in container. I use it not as a microservice, but as a multi service framework. I bootstrap different apps based on $worker->name
and declare $worker->count
based on avarage workloads. I have monitoring app, all other workers send usage statistics there and i hope soon i will see pretty charts in admin panel. Sometimes there is a big spikes like daily sync from external system. It dumps a lots of data at once. I can see when all of the workers busy and more data waits to be processed, so is there a simple way to scale worker count? I cant scale pod count as it produces lots of new bugs, workers share most of data only in their own container. So i'm looking for more "native" solution, like when i recieve big chunk of data, spawn 20 more workers and when most of workers in idle state to scale down and free resources. Is there a way to achive this? maybe some kind of socket in master process to comunicate with monitoring?
p.s. Workerman works great with lumen framework, but i had to rewrite whole request/response flow to implement fibers. Performance is amazing.