Thanos: How to Config time for upload block data from Prometheus to Object Storage, How to deduplicate?

Created on 10 Jan 2019  路  7Comments  路  Source: thanos-io/thanos

Hello,
I set up a thanos system, but I have 3 questions.

  1. How to Config time for upload block data from Prometheus to Object Storage?
    Now, every 2 hours, block data upload to Object Storage.
    I want to change it from every 2 hours to 5 minutes or less more.

  2. I have 3 server.
    Server A: Save data from 00:00 -> 23:59 09 Jan 2019.
    Server B: Save data from 00:00 -> 23:59 09 Jan 2019.
    Store Gateway C: Get data from S3 from 00:00 01 Jan 2019 -> 23:59 09 Jan 2019.

I use Querier and query to 3 Server (A, B, C). It is OK?
And if I have a query get data from 00:00 01 Jan 2019 -> 23:59 09 Jan 2019, what store it use to respond to Querier?

  1. I have 2 server.
    Server A: Save data from 00:00 -> 23:59 09 Jan 2019.
    Server B: Save data from 00:00 -> 23:59 09 Jan 2019.
    When I use deduplication, I have a query get data from 00:00 01 Jan 2019 -> 23:59 09 Jan 2019, what store it use to respond to Querier? From Server A or Server B?

Thank you ^^

All 7 comments

Hey,

You cannot change that as this is core TSDB decision. The block is created only every 2h, so you cannot upload every 5m.

If you want more "stateless" approach, you need something that supports remote-write . Thanos support for it is in progress:https://github.com/improbable-eng/thanos/blob/master/docs/proposals/approved/201812_thanos-remote-receive.md

@bwplotka
Could you tell me how to deduplicate data in thanos?

Example:
I have 2 server.
Server A: Save data from 00:00 -> 23:59 09 Jan 2019.
Server B: Save data from 00:00 -> 23:59 09 Jan 2019.
When I use deduplication, I have a query get data from 00:00 01 Jan 2019 -> 23:59 09 Jan 2019, what store it use to respond to Querier? From Server A or Server B?

Thank you.

It uses from both A and B and deduplicate in runtime transparently. This way it fill any gaps if second replica has data for those gaps and vice versa (:

@bwplotka
Sorry, But when both A and B have data, What data will be show?
Could you tell me priority of deduplication?
Example:
Server A: value = 5
Server B: value = 7
=> result: value=?

Thank you.

There is a penalty based alghorithm which choose random one and if it has gaps it fills them with data from other replica (:

Oh. Algorithm random ^^

You're very helpful.
Thank you for your support ^^

@fabxc @bwplotka Could you tell me how to manually upload those blocks to the bucket?

Was this page helpful?
0 / 5 - 0 ratings