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

rework client connection pool #1994

Merged
merged 8 commits into from Feb 16, 2021
Merged

rework client connection pool #1994

merged 8 commits into from Feb 16, 2021

Conversation

fakeshadow
Copy link
Contributor

@fakeshadow fakeshadow commented Feb 15, 2021

PR Type

Refactor

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt.
  • (Team) Label with affected crates and semver status.

Overview

Rework actix-http client connection pool. This pool is only used in awc and is fairly complicated.

This PR use a more heavy but simpler approach. A tokio::sync::Semaphore is used to limit concurrent access to pool and connection's lifecycle is only checked when they are popped from pool.

In theory this would make the pool slower and more memory hungry but it's arguable noticeable in real world.
And follow up changes can made into the new pool to adjust these problems if they show.

@fakeshadow fakeshadow added A-awc project: awc A-http project: actix-http B-semver-major breaking change requiring a major version bump labels Feb 15, 2021
Copy link
Member

@robjtede robjtede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-awc project: awc A-http project: actix-http B-semver-major breaking change requiring a major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants