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

Check replication setting for JetStream #18

Open
welteki opened this issue Oct 10, 2022 · 3 comments
Open

Check replication setting for JetStream #18

welteki opened this issue Oct 10, 2022 · 3 comments

Comments

@welteki
Copy link
Member

welteki commented Oct 10, 2022

Check if nats.streamReplication is set to a minimum of 3, the recommended production value.

Expected Behaviour

Print a warning when nats.streamReplication is set to a value less then 3.

Current Behaviour

No checks are implemented.

Possible Solution

Check the value of the nats_stream_replicas env variable for the queue-worker

@mrwormhole
Copy link

mrwormhole commented Mar 8, 2023

@welteki seems like this is done https://github.com/openfaas/config-checker/blob/master/main.go#L545-L547
can be closed perhaps

@alexellis
Copy link
Member

alexellis commented Mar 13, 2023

Hi @mrwormhole this would need to look at the stream replication by connecting to the JetStream API itself, rather than the number of replicas. Thanks for your interest.

Alternatively, as @welteki says, there's an env-var that can be inspected.

@mrwormhole
Copy link

ok so I will locate the queue_worker pod then get its env variable via kubernetes go client for nats_stream_replicas

is queue worker always single pod?

or I talk to nats pod via nats client and ask for replica count. I will do what @welteki says

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

3 participants