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

Optimize insecure registry failover by caching failover history #2132

Merged
merged 20 commits into from
Nov 14, 2019

Conversation

chanseokoh
Copy link
Member

@chanseokoh chanseokoh commented Nov 7, 2019

Fixes #946.

Significantly cuts the number of HTTP registry connections, by more than half in my testing from 528 to 248. Once a failover occurs for a registry host, it is not repeated (down to 4 from 127 as shown below).

In practice, however, due to Jib's concurrent connections, it may repeat the failover for the same host but mostly only once or twice.

$ grep 'User-Agent: jib' network_traces.sh.log | wc -l
528
$ grep '\(again with no TLS verification\.\)\|\(again with HTTP\.\)' network_traces.sh.log | wc -l
127
$ grep 'User-Agent: jib' network_traces.sh.log | wc -l
248
$ grep '\(again with no TLS verification\.\)\|\(again with HTTP\.\)' network_traces.sh.log | wc -l
4

Increases the failover log level from INFO to WARNING.

@chanseokoh chanseokoh marked this pull request as ready for review November 8, 2019 22:45
@chanseokoh
Copy link
Member Author

This is now ready for review.

@chanseokoh
Copy link
Member Author

Huh, this branch isn't really the one that I originally intended to put up. Somehow I see some commit is lost. The failoverHistory map should be a ConcurrentHashMap.

@TadCordle
Copy link
Contributor

Oh and changelog, haha

@loosebazooka
Copy link
Member

We can probably put this out with 1.8...

@chanseokoh chanseokoh merged commit f976486 into master Nov 14, 2019
@chanseokoh chanseokoh deleted the i946-insecure-failover-history-final branch November 14, 2019 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize insecure registry failover
4 participants