ruvoy 0.2.1-x86_64-linux → 0.3.0-x86_64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d90daa6f044467b4a5a0059c96debe320f989b6e1acf7fe9194a4be23bbf446
4
- data.tar.gz: 3c55f4b9274f9abd01a6c6a5e480b58ab9cb3f7e3e32cc2ae838a85c18bc4020
3
+ metadata.gz: 267edfc5bd783c89f4cdf67a901208abc8bdc864731e317f54844a90edccdc07
4
+ data.tar.gz: 3f2606403c1b214ac244e22bd4eb9bb93fb6a015fbc06cdc57412b7cc9822323
5
5
  SHA512:
6
- metadata.gz: d06b5d3a5e2d003593f0a7ecb7d39276485fdbaee66b12d72638009de68b8ab6988683d6f53fec7faccb62c33a3cf70c52bda4198427b4d422bc0c04ed8c5cba
7
- data.tar.gz: a8866d45815b5321f12e1ebdcef5afabf077487ee96387d7a3f923b333e1b06b089ec8feccf096890cdd55edada3da8c8de370ffa750545ff202f6a153d899c1
6
+ metadata.gz: 04dff6a6abdaaf19a26d522a66d72c334ae59dc2e7b60bd9b149f0196df7718d90a5e41a76e43a743c64353620da088772ced2d13ce00bd32aaf3fa133194405
7
+ data.tar.gz: 4da1c6f133dd80441c1966eb396b1fd6b898d84a094dc8340257cb9b5e758648f5e55130e365a6296aff601426d65c776fde20dad770f784bffad023fd4541b4
data/README.md CHANGED
@@ -141,6 +141,10 @@ kept, in memory up to 128 KiB and in a temporary file beyond that, so
141
141
  Rack versions expect. Raw socket hijacking
142
142
  (`rack.hijack`) is not supported; the connection always belongs to Envoy.
143
143
 
144
+ WebSocket and other upgrades use Rack 3's `rack.protocol` with a streaming
145
+ body instead, over HTTP/1.1 and HTTP/2, once Envoy allows them
146
+ (`upgrade_configs`, plus `allow_connect` for HTTP/2).
147
+
144
148
  A response body that fails after its headers are already on the wire resets
145
149
  the stream, so the client sees an error rather than a short body that looks
146
150
  complete.
@@ -276,28 +280,18 @@ one request overlap. A repeated response header arrives as an Array.
276
280
  - `call` buffers the response whole, so `max_response_bytes` bounds what one
277
281
  call can hold in memory.
278
282
 
279
- `stream` takes the same arguments and returns once the response head is in.
280
- The body yields the response as it arrives and can be returned as the Rack
281
- response, so a proxy is one line:
283
+ `stream` takes the same arguments but returns once the head is in, with a
284
+ body that streams and can be returned as the Rack response, so a proxy is one
285
+ line:
282
286
 
283
287
  ```ruby
284
288
  run ->(env) { env["ruvoy.upstream"].stream("api", env["REQUEST_METHOD"], env["PATH_INFO"], body: env["rack.input"]) }
285
289
  ```
286
290
 
287
- - The request body may be a String or anything that responds to `read`, such
288
- as `rack.input`. One that ends within its first 64 KiB goes with its length,
289
- an empty one as none, and a longer one chunked while the response comes down.
290
- - `idle_timeout:` bounds the wait for the head and between chunks, `timeout_ms`
291
- by default, and raises `Ruvoy::UpstreamTimeout`. `timeout:` bounds the whole
292
- exchange and is unset by default: Envoy answers 504 before the head, and
293
- resets the stream after it.
294
- - Envoy applies no flow control to a stream a module starts, so at most
295
- `upstream.stream_buffer_bytes` (default 1 MiB) of the response waits for a
296
- slow reader. Past that the stream is reset and the reader gets
297
- `Ruvoy::UpstreamOverflow`. The request body is held to the same budget until
298
- Envoy takes it; what Envoy buffers after that is not bounded by Ruvoy.
299
- - Closing the body before its end, or finishing the request, resets the
300
- stream. `body.trailers` holds the upstream's trailers once the body has ended.
291
+ Envoy applies no flow control to it, so a reader that falls more than
292
+ `upstream.stream_buffer_bytes` (1 MiB by default) behind has the stream reset.
293
+ With `protocol: "websocket"`, the response upgrades the client too and relays
294
+ both ways.
301
295
 
302
296
  [`examples/extensions`](examples/extensions) runs both against a stand-in
303
297
  service, including two calls from one request overlapping.
Binary file
data/lib/ruvoy/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  module Ruvoy
4
4
  # Kept in step with the Cargo workspace version by test/e2e/cli_test.rb: the
5
5
  # gem and the module it carries are the same release.
6
- VERSION = "0.2.1"
6
+ VERSION = "0.3.0"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruvoy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Zixin Zhou