This message originated from Cribl Community Slack.
Click here to view the original link.
Anyone have any information on how the Javascript process works in Cribl. Things like how many processes are there, how can we create or access memory objects in process memory. Are processes shared between pipelines, between functions in the same pipelines? For example, can we create variables in one Code function and access them in another?
Solved
Cribl Javascript Process Memory Management And Variable Sharing Between Functions Inquiry
Best answer by sball567
For workers the number of worker processes is determined by the worker group configuration. By default it's a setting that will spawn worker processes based on the number of available CPU cores leaving some overhead available but it can also be configured with a fixed number.
By design worker processes are a "share nothing" architecture. The processes are not spawned by pipeline or function but end-to-end processes that independently accept events, process those events, and send those events.
I don't know off the top of my head if code functions allow variables to be shared but I would assume that is not possible. Generally the approach is to transform events e.g. adding/changing/removing fields on the event itself.
It looks like this reference architecture page has a pretty good writeup: https://docs.cribl.io/reference-architectures/core-arch-concepts/#data-plane in the "Cribl Stream Data Plane" section
Sign up
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
