Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: Documentation for multi process worker could be improved to explain the behavior for hybrid config (defined inside worker directive and outside as well) #326

Open
patidar-suresh opened this issue Jun 4, 2021 · 0 comments

Comments

@patidar-suresh
Copy link

I was trying out multi process worker for one of my use case where few pipeline need to run in dedicated worker while some pipeline need to be defined outside any worker directive and should run on any of the worker process. While doing this, I wasn't sure how the configuration were included/loaded in each worker process and was unclear on the behavior observed. After doing some POC, I could understand the behavior. I suggest adding this in the documentation sot that it might help others understand the working behavior quickly.

The POC was done using "http" plugin which supports multi process worker and created pipelines to use it in dedicated workers as well as running in all the workers. The messages were sent using curl command on different ports to see the output.

Observations from POC:

Message forwarding behavior:
o For same port exposed in different workers, messages are sent randomly to one of the workers exposing that port.
o For same port exposed in worker(s) and at global (outside any worker), messages are sent randomly to one of the workers from entire worker list (irrespective of the worker exposing that port or not)
o For unique ports exposed in different workers, messages are sent to specific worker exposing respective ports

Filtering/Matching behavior:
o Common config (input/filters/match) which is not defined in any worker is included/considered in each worker.
o Common configs(input/filters/match) are included prior to any other config defined under specific worker tag

Following diagram depicts the actual setup used for POC.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant