Bilge
Bilge2mo ago

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
rubenf
rubenf2mo ago
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
Bilge
BilgeOP2mo ago
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?
rubenf
rubenf2mo ago
yes and they're also executed by our rust backend directly instead of being forks of other runtimes
Bilge
BilgeOP2mo ago
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?
rubenf
rubenf2mo ago
you can but you shouldn't
Bilge
BilgeOP2mo ago
Whyever not?
rubenf
rubenf2mo ago
because you do not want multiple forks of the php runtime working inside the same worker without proper resource limits
fooosieee
fooosieee2mo ago
so gonna be faster executed theoretically?
rubenf
rubenf2mo ago
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
fooosieee
fooosieee2mo ago
have all the same environment as forked workers ya?
jaml0
jaml02mo ago
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?
rubenf
rubenf2mo ago
With the EE key you can easily assign the default workers to listen to every job in the worker group ui
jaml0
jaml02mo ago
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.

Did you find this page helpful?