Skip to content

Conversation

@jphines
Copy link
Contributor

@jphines jphines commented Feb 19, 2019

Problem

In dynamic routing environments, upstreams may move IP addresses and intermediate gateways may not gracefully terminate those TCP connections. This is particularly problematic in environments were upstreams may exist on shared infrastructure such as AWS Application Load Balancers.

Solution

We need to provide a reset deadline for these TCP connections to rotate them, even if the TCP connections are still active. Unfortunately, to the best of my knowledge, the Go standard library does not provide such dials to rotate active TCP connections after some deadline period.

We implement this logic by lazily rotating the entire HTTP Transport object after deadline intervals expire.

This will create some extra garbage but this should be nominal in most environments.

Copy link
Contributor

@loganmeetsworld loganmeetsworld left a comment

Choose a reason for hiding this comment

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

This LGTM

@jphines jphines merged commit e9e8090 into master Feb 27, 2019
@jphines jphines deleted the sso-proxy-transport-reset-deadline branch February 27, 2019 01:38
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.

2 participants