From dedc4972187dab09b1e0e37c10ff1fe8c0380582 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 23 Mar 2022 20:19:33 +0100 Subject: update CHANGELOG Signed-off-by: Valery Piashchynski --- CHANGELOG.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0001cfae..91ddce49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,60 @@ ## ๐Ÿ‘€ New: +- โœ๏ธ **[ALPHA]** HTTP response streaming. Starting from the `v2.9.0` RR is capable to stream responses. +To turn on that feature, please, add the following lines to the configuration: +```yaml +experimental: + response_streams: true +``` + +Worker sample: +```php +chunk_size = 10 * 10 * 1024; +$filename = 'file.tmp'; // big file or response + +while ($req = $psr7->waitRequest()) { + try { + $fp = \fopen($filename, 'rb'); + \flock($fp, LOCK_SH); + $resp = (new Response())->withBody(Stream::create($fp)); + $psr7->respond($resp); + } catch (\Throwable $e) { + $psr7->getWorker()->error((string)$e); + } + +``` + +Known issues: +1. RR will not notify a worker if HTTP connection was interrupted. RR will read all response from the worker and drop it. That will be fixed in the stable streaming release. +2. Sometimes RR may miss the immediate error from the worker and send a 0 payload with 200 status. This is related only to the http response. + - โœ๏ธ [**API**](https://github.com/roadrunner-server/api): add service proto api to manage services, [FR](https://github.com/roadrunner-server/roadrunner/issues/1009) (reporter @butschster) -- + +## ๐Ÿงน Chore: + +- ๐Ÿง‘โ€๐Ÿญ Update all dependencies to the most recent versions. + +--- + ## v2.8.5 (23.03.2022) ## ๐Ÿงน Chore: -- cgit v1.2.3