-
Notifications
You must be signed in to change notification settings - Fork 8
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
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks Valentin
No description provided.