Add support for gzip encoding in HTTP requests#50
Conversation
|
@yuyiguo , here is set of changes to allow DBSClient to use gzip encoding for HTTP POST requests, e.g. bulkblocks API. My original benchmark shows that usage of such encoding can save us 10-20 times on network, e.g. 180MB payload can be easily gzipped to 3MB before sending to server. Of course, the server itself should be aware of such encoding and handle properly such data. That's why I disable it by default (see @amaltaro you can also use this as an example for other WMCore client's calls. And, it is related to dmwm/DBS#648 and dmwm/WMCore#10451 issues. I provided concise example of Cherrypy server implementation in my gist. |
yuyiguo
left a comment
There was a problem hiding this comment.
This gzip looks good to me. I think it is good to keep the default is off. This may only useful for the millions of lumi insertion. The network seems not a big consumer for DBS.
|
@yuyiguo it is a issue for our frontends though, if we can reduce payload on FE then FE will need less resources and process it faster. So, if you don't mind I'll merge it after I'll perform additional tests on BE servver. |
|
@vkuznet |
amaltaro
left a comment
There was a problem hiding this comment.
Valentin, besides the comment left along the code, I would suggest to always test both native python3 string and bytes type when implementing these string handling methods.
|
@amaltaro it would be nice if you'll review it before you're going to vacation, such that I can merge and proceed. |
amaltaro
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks Valentin
No description provided.