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

Spawn ready: drives a service's readiness on an executor #283

Merged
merged 7 commits into from
May 29, 2019

Conversation

olix0r
Copy link
Collaborator

@olix0r olix0r commented May 25, 2019

Some layers cannot guarantee that they will poll inner services in a
timely fashion. For instance, the balancer polls its inner services to
check for readiness, but it does so randomly. If its inner service
must be polled several times to become ready, e.g., because it's driving
the initiation of a TLS connection, then the balancer may not drive the
handshake to completion.

The SpawnReady layer ensures that its inner service is driven to
readiness by spawning a background task.

Some layers cannot guarantee that they will poll inner services in a
timely fashion. For instance, the balancer polls its inner services to
check for readiness, but it does so randomly. If its inner service
must be polled several times to become ready, e.g., because it's driving
the initiation of a TLS connection, then the balancer may not drive the
handshake to completion.

The `SpawnReady` layer ensures that its inner service is driven to
readiness by spawning a background task.
@olix0r olix0r requested a review from carllerche May 25, 2019 18:30
Copy link
Collaborator Author

@olix0r olix0r left a comment

Choose a reason for hiding this comment

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

needs to be added to azure-pipeline.yaml...

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

This looks pretty good. I commented on a few minor things.

tower-spawn-ready/src/service.rs Outdated Show resolved Hide resolved
tower-spawn-ready/src/service.rs Outdated Show resolved Hide resolved
tower-spawn-ready/src/future.rs Outdated Show resolved Hide resolved
tower-spawn-ready/src/service.rs Outdated Show resolved Hide resolved
tower-spawn-ready/src/future.rs Outdated Show resolved Hide resolved
@olix0r olix0r merged commit 42f4b77 into tower-rs:master May 29, 2019
@olix0r olix0r deleted the ver/spawn-ready branch May 29, 2019 16:57
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