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

Headers: Adds optimized request headers #3177

Merged
merged 11 commits into from
May 17, 2022
Merged

Conversation

j82w
Copy link
Contributor

@j82w j82w commented May 6, 2022

Pull Request Template

Description

Refactor the headers to use the new optimized header

Header structure:

Headers -> public contract (Ideally this should have been a public contract without implementation)
CosmosMessageHeadersInternal -> Internal contract the v3 SDK uses to workaround breaking changes since headers can not be modified. This is common headers used in both the request and response.

StoreRequestHeaders -> converts the RequestNameValueCollection to the CosmosMessageHeadersInternal
StoreResponseHeaders -> converts the StoreResponseNameValueCollection to the CosmosMessageHeadersInternal
HttpResponseHeadersWrapper -> gateway response implementation of CosmosMessageHeadersInternal

Performance results which shows roughly 7% increase in throughput:
image

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] This change requires a documentation update

Closing issues

To automatically close an issue: closes ##2992

@sourabh1007
Copy link
Contributor

Do we have numbers around perf improvement ?

@sourabh1007
Copy link
Contributor

From the description, I am not sure one is more optimized than the other. Can you please explain that also.. Some kind of summary.

@j82w j82w changed the title Headers: Adds optimized request headers DRAFT: Headers: Adds optimized request headers May 9, 2022
@j82w
Copy link
Contributor Author

j82w commented May 10, 2022

Do we have numbers around perf improvement ?

Updated description with perf numbers. Roughly 7% increase in throughput.

@j82w j82w changed the title DRAFT: Headers: Adds optimized request headers Headers: Adds optimized request headers May 13, 2022
@j82w j82w enabled auto-merge (squash) May 17, 2022 16:11
@j82w j82w merged commit cda62eb into master May 17, 2022
@j82w j82w deleted the users/jawilley/direct/3.27.3 branch May 17, 2022 16:44
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

Successfully merging this pull request may close these issues.

3 participants