Skip to content

Conversation

@khaines
Copy link
Contributor

@khaines khaines commented Feb 15, 2018

We have some data scenarios where the amount of data exceeds the 64MB fixed size that the grpc client was set to for a max message size (added in #660). This update changes that to a configurable command arg flag, with the default being set to 64MB.

@khaines khaines changed the title Updating IngesterClient MaxCallRecvMsgSize to be configurable vs Fixed Size Updating IngesterClient MaxCallRecvMsgSize to be configurable vs fixed size Feb 15, 2018
}

client, err := d.cfg.ingesterClientFactory(ingester.Addr, d.cfg.CompressToIngester)
client, err := d.cfg.ingesterClientFactory(ingester.Addr, d.cfg.CompressToIngester, d.cfg.IngesterClientConfig)
Copy link
Contributor

Choose a reason for hiding this comment

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

For bonus points you could move the CompressToIngester flags into the IngesterClientConfig.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I will make the adjustment.

@tomwilkie
Copy link
Contributor

Other than the minor nit, LGTM.

@bboreham
Copy link
Contributor

Any insight into what drives these massive data sizes? Could we do some summarization before sending?

// We have seen 20MB returns from queries - add a bit of headroom
f.IntVar(&cfg.MaxRecvMsgSize, "ingester.client.max-recv-message-size", 64*1024*1024, "Maximum message size, in bytes, this client will receive.")
// moved from distributor pkg, but flag prefix left as-is so existing users do not break.
flag.BoolVar(&cfg.CompressToIngester, "distributor.compress-to-ingester", false, "Compress data in calls to ingesters.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than the confusing name, I think I'd rather have two flags and copy from one to the other to allow backwards-compatibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Certainly. I've added this in the latest updates to the PR.

@bboreham
Copy link
Contributor

BTW, thanks for the contribution! Great to see a broader community.

Ken Haines added 2 commits February 24, 2018 11:34
…ingester.client namespace, but also leaving a fallback flag under distributor for back compat
@khaines
Copy link
Contributor Author

khaines commented Feb 24, 2018

I'm glad to be contributing :). This will be the first of many for this excellent platform

@khaines
Copy link
Contributor Author

khaines commented Feb 24, 2018

As for insight to what is causing the large data size returns, at least in our case it appears to be purely based on the number of timeseries found during the index lookup phase of querying. We have some fun & extreme cases where there are tens of thousands of timeseries matches to a query. This is even during a recording rule job cycle, so it is over a very small time window. I haven't looked too deeply at that api or flow yet, but I in principle agree with a comment Tom made on slack that perhaps a future revision here would be to make it streaming as all the results have to come back in 1 giant message blob currently.

@bboreham
Copy link
Contributor

Couple of lint and test failures - looks like you need to fix up the tests to match changes in the code.

@khaines
Copy link
Contributor Author

khaines commented Feb 27, 2018

Thanks for catching that @bboreham. Our current build system here wasn't running those tests (gasp), so they got missed but thought to be passing. Corrections have been made

@bboreham bboreham merged commit 6191d41 into cortexproject:master Mar 2, 2018
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

Successfully merging this pull request may close these issues.

3 participants