What is the difference between a worker and a native worker?
I still don't really understand the difference between these two worker types and the documentation doesn't seem to really go into it other than to mention the default tags for each.
Is it the case that a regular worker runs in a container but a native worker runs on the host? Or something else?
Workers and worker groups | Windmill
Workers are autonomous processes that run one script at a time using the entire cpu and memory available
13 Replies
it's just a worker with WORKER_GROUP=native and usually NUM_WORKERS=8, which is preset to listen to native/lightweight jobs such as sql jobs
So there's really no technical difference?
It's just that the "native" workers are sharing resources and the non-native workers have dedicated resources?
yes
and they're also executed by our rust backend directly instead of being forks of other runtimes
I don't know what that really means, or what the implications of it would be. Does that mean you cannot, for example, run PHP on a native worker?
you can but you shouldn't
Whyever not?
because you do not want multiple forks of the php runtime working inside the same worker without proper resource limits
so gonna be faster executed theoretically?
more throughput since you have more of them
and yes by nature the native languages are faster
but they're the same speed when executed by non "native" workers as well
have all the same environment as forked workers ya?
I realize that we don't want to combine native and regular workers for performance reasons, but for local development against a docker compose stack, can we have one worker act as both a regular and native worker?
With the EE key you can easily assign the default workers to listen to every job in the worker group ui
sorry, does this mean it's only doable via UI? If so, then I guess it'll be easier to just have the two worker for local development.