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

gzip compression #80

Open
HardWin13 opened this issue Sep 9, 2018 · 2 comments
Open

gzip compression #80

HardWin13 opened this issue Sep 9, 2018 · 2 comments

Comments

@HardWin13
Copy link

Thanks lot for nice library!
Does it support any compression mechanism?
As I know, influxdb supports gzip compression for http line protocol and it would be useful if you'll add it to post request processing.
https://community.influxdata.com/t/line-protocol-compression/4988
Suppose that it helps to reduce the amount of memory for big data storage.

@Henna1977
Copy link

Yes, compression would be nice but is actual not supported.
I use this client to upload big bundles of data and see real heavy network traffic.

@airguru
Copy link

airguru commented Nov 4, 2019

I managed to get the gzip compression running! It turned out to be very easy as you can support a custom HttpClient to the InfluxDbClient.

Do this:

HttpClientHandler handler = new HttpClientHandler();
handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;

HttpClient httpClient = new HttpClient(handler);
httpClient.DefaultRequestHeaders.Add("Accept-Encoding", "gzip");

influxDbClient = new InfluxDbClient(url, user, password, InfluxDbVersion.v_1_3, httpClient: httpClient);

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

No branches or pull requests

3 participants