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

Experimental TSDB: Add support for local filesystem backend #2245

Merged
merged 4 commits into from
Mar 11, 2020

Conversation

slim-bean
Copy link
Contributor

@slim-bean slim-bean commented Mar 10, 2020

What this PR does:

Add support for TSDB blocks to be saved to the local filesystem via the implementation which already exists for this in Thanos.

Used #2083 as a template

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Edward Welch [email protected]

@slim-bean slim-bean force-pushed the tsdb-filesystem branch 3 times, most recently from ec7ff19 to c500b8e Compare March 10, 2020 22:56
Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. It could be nice to use in quick-start guide.

pkg/storage/tsdb/backend/filesystem/bucket_client.go Outdated Show resolved Hide resolved
Signed-off-by: Marco Pracucci <[email protected]>
…p it more consistent with the rest of the config

Signed-off-by: Marco Pracucci <[email protected]>
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed some little changes to improve the doc and address @pstibrany comment, then I went to try it out locally and a question arised. How is it supposed to be used? What's the use case for having this in Cortex?

@pstibrany
Copy link
Contributor

What's the use case for having this in Cortex?

As Marco points out, one can simply disable shipping to the external storage, which is effectively the same.

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I think the use case is for single node cortex, because cortex can run on arm arch and not prometheus.

Which is a big plus for Cortex if you think about it.

I think a documentation of this use case would be nice too.

@pracucci
Copy link
Contributor

pracucci commented Mar 11, 2020

I talked to Ed offline. Ed's use case is running a single-node Cortex offline and then having a periodic rsync to synch blocks to a storage synched by a secondary Cortex cluster.

Despite this can be done disabling the shipper and having an rsync of blocks (not WAL), from a UX perspective looks more cleaner/easier using the filesystem storage backend and having an rsync with the filesystem dir as source. Moreover the shipper manipulates the meta.json (ie. adds the external labels) and looks the safest approach in this case.

@pracucci pracucci merged commit c0b0238 into cortexproject:master Mar 11, 2020
@pracucci
Copy link
Contributor

I think the use case is for single node cortex, because cortex can run on arm arch and not prometheus.

My take is that for a single node Cortex with blocks storage you don't need the filesystem support. You can just run Cortex single binary disabling the shipper.

@cyriltovena
Copy link
Contributor

Yeah I don't have enough knowledge on this !

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

Successfully merging this pull request may close these issues.

4 participants