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

Using bioyino as statsd-agent #62

Open
sti-jans opened this issue May 9, 2021 · 3 comments
Open

Using bioyino as statsd-agent #62

sti-jans opened this issue May 9, 2021 · 3 comments
Labels

Comments

@sti-jans
Copy link
Contributor

sti-jans commented May 9, 2021

Hello!

I want to clarify some details.

  1. Did I understand correctly that if we use bioyino as a statsd-agent, it can write its data to the cluster via the peer port over tcp? Maybe you have an example of bioyino configuration as agent?
  2. Now bioyino can only write to one carbon backend over tcp?
@Albibek
Copy link
Collaborator

Albibek commented May 9, 2021

Hi.

  1. Yes. It pre-aggregates metrics for a short period and replicates them as snapshots to all nodes specified in config using an internal binary protocol. For cluster, obviously, it should be the cluster nodes, but you can add any node. Technically this is the same messages, that cluster nodes exchange between each other.

The example is simple, because there is only replication, no aggregation, no backend, no renames. Something like this (mentioning only important parameters) should work.

consensus = "none"
# absense of consensus and not being a leader will guarantee that nothing will be sent to backend,
# even connection will not be established.
start-as-leader = false

[carbon]
# interval is still meaningful, because it triggers some cleanup, but it can be left at a default vaule
interval = 30000

[network]
# a list of nodes to replicate metrics to 
nodes = [ "127.0.0.1:8181" ]
# how often to send snapshots
snapshot-interval = 1000 
# a maximum length of the snapshot queue, drops older snapshots in case remote node cannot receive them
max-snapshots = 1
  1. Yes. Because writing to many requires a lot of complicated logic behind it. Imagine one of the backends going offline for example. There are many strategies for different use cases to handle this: duplicating, balancing, etc. For this reason we leave these to other solutions, like carbon-c-relay or our own solution (warning: it's still alpha and not in active development yet, but who knows, maybe it will someday)

@sti-jans
Copy link
Contributor Author

Thanks for the answer!

What value for max-snapshots can I take to start with? Is the default value ok?

@Albibek
Copy link
Collaborator

Albibek commented May 11, 2021

Default value means to loose each snapshot. If you have ehough memory, it's usually better to have all the snapshots for the whole aggregation interval. The bigger value is totally useless and even destructive because these will be metrics for the previous period. Note, that metrics in the snapshot are still realtime, meaning there's no timestamp inside.

So for i.e. 30 seconds interval and snapshot taken every 1 second, max-snapshots should be between 1 and 30.

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

No branches or pull requests

2 participants