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

Avoid uneeded fragmented TLS work around for PHP 7.3.3+ #202

Merged
merged 1 commit into from
Jun 1, 2019

Conversation

clue
Copy link
Member

@clue clue commented May 31, 2019

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

@clue clue added this to the v1.2.1 milestone May 31, 2019
@clue clue requested review from jsor and WyriHaximus June 1, 2019 10:51
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants