Closed schneefux closed 7 years ago
Hey dudes - Yeah, we can do this. Great one. I'll add a compresses version of the telemetry.
This will ship tomorrow or monday. What we did:
Example:
{
"type": "asset",
"id": "2be27e6f-2fa0-11e7-8833-0242ac110009",
"attributes": {
"URL": "https://cdn.gamelockerapp.com/semc-vainglory/na/2017/05/03/01/31/2be27e6f-2fa0-11e7-8833-0242ac110009-telemetry.json",
"contentType": "application/json",
"createdAt": "2017-05-03T01:31:03Z",
"description": "",
"filename": "telemetry.json",
"name": "telemetry"
}
},
Then:
ext.bcorrigan@BCORR1ML1 11:17:32 ~/code/gamelocker/gamelocker-core-stack/terraform |master {1} ✓| → time curl -so /dev/null https://cdn.gamelockerapp.com/semc-vainglory/na/2017/05/03/01/31/2be27e6f-2fa0-11e7-8833-0242ac110009-telemetry.json
real 0m0.172s
user 0m0.020s
sys 0m0.019s
ext.bcorrigan@BCORR1ML1 11:17:33 ~/code/gamelocker/gamelocker-core-stack/terraform |master {1} ✓| → time curl -so /dev/null -H "Accept-Encoding: gzip, deflate" https://cdn.gamelockerapp.com/semc-vainglory/na/2017/05/03/01/31/2be27e6f-2fa0-11e7-8833-0242ac110009-telemetry.json
real 0m0.101s
user 0m0.020s
sys 0m0.015s
ext.bcorrigan@BCORR1ML1 11:17:38 ~/code/gamelocker/gamelocker-core-stack/terraform |master {1} ✓| → time curl -so /dev/null https://cdn.gamelockerapp.com/semc-vainglory/na/2017/05/03/01/31/2be27e6f-2fa0-11e7-8833-0242ac110009-telemetry.json
@genexp
Retroactively update all asset urls
Can I safely rewrite the domain of all cached URLs in our database?
A 20 minute match is `~1.3 MB large, which takes 0.5s to download on a 100 MBit/s connection.
Using gzip compression, the JSON's size can be reduced to 57kb ~ 100kb (5%!!! depending on
--fast
or--best
). As you can see in the response headers, the http response is not compressed. Without having further knowledge about your infrastructure, maybe this blog post is what would be helpful to drastically improve response times and reduce traffic costs.