-
Notifications
You must be signed in to change notification settings - Fork 133
Add support for HTTP/1 connection pre-warming #856
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
Conversation
Motivation This patch adds support for HTTP/1 connection pre-warming. This allows the user to request that the HTTP/1 connection pool create and maintain extra connections, above-and-beyond those strictly needed to run the pool. This pool can be used to absorb small spikes in request traffic without increasing latency to account for connection creation. Modifications - Added new configuration properties for pre-warmed connections. - Amended the HTTP/1 state machine to create new connections where necessary. - Added state machine tests. Results Pre-warmed connections are available.
0120933
to
d2a4dcc
Compare
let newConnectionID = self.connections.createNewConnection(on: connectionToClose.eventLoop) | ||
connectionAction = .closeConnectionAndCreateConnection( | ||
closeConnection: connectionToClose, | ||
isShutdown: .no, |
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.
as far as I can see this is always no
. Therefore we should likely remove it.
close: Connection, | ||
newConnectionID: Connection.ID, | ||
on: EventLoop, | ||
isShutdown: StateMachine.ConnectionAction.IsShutdown |
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.
As mentioned elsewhere we don't need this one here.
Ok, feedback addressed. |
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 looks really good! Thanks!
Motivation
This patch adds support for HTTP/1 connection pre-warming. This allows the user to request that the HTTP/1 connection pool create and maintain extra connections, above-and-beyond those strictly needed to run the pool. This pool can be used to absorb small spikes in request traffic without increasing latency to account for connection creation.
Modifications
Results
Pre-warmed connections are available.