go-graphite / carbon-clickhouse

Graphite metrics receiver with ClickHouse as storage
MIT License
186 stars 47 forks source link

Reliable approach to send metrics #17

Closed maxpolezhaev closed 6 years ago

maxpolezhaev commented 6 years ago

As I can understand, sending via plaintext or pickle do not guarantee that metrics are stored to the disk buffer (and then to clickhouse). In https://github.com/lomik/carbon-clickhouse/blob/master/grpc/carbon.proto I found StoreSync RPC with a comment that says "StoreSync returns response only after data has written to drive." So does this mean that I should use gRPC and StoreSync if I need a reliable approach to send and store metrics? Do I have any other options?

lomik commented 6 years ago

Do I have any other options?

StoreSync is the only reliable delivery method. In other cases, the data may be lost when the daemon is restarted or crashed

maxpolezhaev commented 6 years ago

OK, I see. Thank you for your quick response and great software!