Avoid uneeded fragmented TLS work around for PHP 7.3.3+#202
Merged
WyriHaximus merged 1 commit intoreactphp:masterfrom Jun 1, 2019
Merged
Avoid uneeded fragmented TLS work around for PHP 7.3.3+#202WyriHaximus merged 1 commit intoreactphp:masterfrom
WyriHaximus merged 1 commit intoreactphp:masterfrom
Conversation
The work around was introduced in order to bring TLS 1.3 support to all supported versions, but at the same time it may cause very large data chunks for high throughput scenarios. The underlying bug has been fixed in PHP 7.3.3 and PHP 7.2.15, so we can avoid this now uneeded work around on said version.
jsor
approved these changes
Jun 1, 2019
WyriHaximus
approved these changes
Jun 1, 2019
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The work around was introduced in order to bring TLS 1.3 support to all
supported versions, but at the same time it may cause very large data
chunks for high throughput scenarios. The underlying bug has been fixed
in PHP 7.3.3 and PHP 7.2.15, so we can avoid this now uneeded work
around on said version.
Reproduction is not exactly trivial unfortunately. Prior to #186, older PHP version would simply consume 100% CPU usage when using an otherwise perfectly valid TLS 1.3 connection when the remote peer did not send any data (common for HTTPS). After applying #186 this bug has been avoided on all supported versions, including older PHP versions. However, at the same time it may cause very large data chunks for high throughput scenarios. In other words, when downloading large files over HTTPS, it would start emitting chunks of data that could be multiple megabytes large which has a significant performance hit. Now that the underlying bug in PHP has been fixed with PHP 7.3.3 and PHP 7.2.15, we do not need this work around from #186 anymore. As such, we now have proper TLS 1.3 support with reasonable data chunks on recent PHP versions and still have a work around for TLS 1.3 on older PHP versions.
Builds on top of #201 and #186
See https://bugs.php.net/bug.php?id=77390