-
Notifications
You must be signed in to change notification settings - Fork 1.3k
gzip telemetry events #3979
Comments
I'm surprised that we don't do this already. |
If content encoding is set to gzip, this is automatically handled in the background by |
There are 3rd party libs that make this transparent for iOS, too (https://github.com/AFNetworking/AFgzipRequestSerializer/blob/master/AFgzipRequestSerializer/AFgzipRequestSerializer.m?#L57) but we don't use a 3rd party dep in the iOS bindings |
الشبكات |
Resources that we can draw upon for our own GZIP implementation:
|
What I mentioned in #3979 (comment) is not true. To GZIP our communication we need to implement the following request interceptor on OkHttp: https://github.com/square/okhttp/blob/3f7a3344a4c85aa3bbb879dabac5ee625ab987f3/samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java#L73 This shouldn't be a big lift since we just need to copy/paste it into our telemetry web service code. |
@tobrun We're using something similar in Human too. Can take a look at that too if you want. |
The api already accepts gzip'd JSON as long as the following headers are set on the POST request:
|
I've ticketed out the Android work in #5536. |
This is done on the iOS side (#5490) and will be included in the final v3.3.0 release. |
Make sure that we gzip telemetry events before sending them. gzip could reduce the time the mobile radio is working, especially on slower connections, and thus reduce battery impact.
/cc @boundsj
The text was updated successfully, but these errors were encountered: