@mark1russell7/machines 0.3.18 → 0.3.20
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.
- package/README.md +3 -1
- package/build/index.d.ts +46 -0
- package/build/index.js +794 -188
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,6 +34,7 @@ The algebra reads these documents. It gives the closed form of each timer, the f
|
|
|
34
34
|
| `NODE_HTTP_SERVER` | `node-http-server` | One connection of the `http.Server` of Node 24.21.0 | server | 8 implemented |
|
|
35
35
|
| `NODE_HTTP_AGENT` | `node-http-agent` | One socket of the `http.Agent` of Node 24.21.0 | driver | 9 implemented |
|
|
36
36
|
| `UNDICI_CLIENT` | `undici-client-h1` | The socket of an HTTP/1.1 `Client` of undici 8.12.2 | driver | 8 implemented |
|
|
37
|
+
| `UNDICI_RETRY` | `undici-retry-agent` | One request through a `RetryAgent` of undici 8.12.2 | driver | 7 implemented, 1 normative |
|
|
37
38
|
| `GO_TRANSPORT` | `go-nethttp-transport` | One connection of the `http.Transport` of Go 1.27.2 | driver | 7 implemented |
|
|
38
39
|
| `PROCEDURES_WS_CLIENT` | `procedures-ws-client` | The WebSocket client of `@procedures/client` 0.3.0 | driver | 9 implemented, 1 documented |
|
|
39
40
|
| `PROCEDURES_WS_SERVER` | `procedures-ws-server` | The WebSocket server of `@procedures/client` 0.3.0 | server | 4 implemented |
|
|
@@ -59,8 +60,9 @@ The algebra reads these documents. It gives the closed form of each timer, the f
|
|
|
59
60
|
| `TOXIPROXY_LINK` | `toxiproxy-link` | Toxiproxy 2.12.0 with no toxic: one proxied TCP connection and its close | proxy | 9 implemented |
|
|
60
61
|
| `DOCKER_PROXY_LINK` | `docker-proxy-link` | docker-proxy of Docker Engine 29.1.5: one proxied TCP connection and its close | proxy | 9 implemented |
|
|
61
62
|
| `CADDY_HTTP2` | `caddy-http2` | Caddy 2.11.7 as an HTTP/2 proxy of gRPC: one connection of a client, its idle close, its replies and its stop | proxy | 12 implemented |
|
|
63
|
+
| `NGINX_GRPC` | `nginx-grpc` | nginx 1.29.6 as an HTTP/2 proxy of gRPC: one connection of a client, its idle close, the read timer of a call, and a stopped worker | proxy | 12 implemented, 1 documented |
|
|
62
64
|
|
|
63
|
-
Twenty-
|
|
65
|
+
Twenty-nine documents operate on Linux TCP (`over`). Seven documents operate on no other document: Linux TCP, conntrack, the Sentinel, the replication of mongod, aten, the member of Ra and the `RetryAgent` of undici. The `RetryAgent` is one request above the sockets of a `Client`. Its timer is the delay of a retry. Each retry can go on a new socket. The `conditions` of each document give the range where it holds, for example a range of kernels.
|
|
64
66
|
|
|
65
67
|
The package also gives these parts:
|
|
66
68
|
|
package/build/index.d.ts
CHANGED
|
@@ -95,6 +95,29 @@ export declare const NODE_HTTP_SERVER: Machine;
|
|
|
95
95
|
*/
|
|
96
96
|
export declare const UNDICI_CLIENT: Machine;
|
|
97
97
|
//#endregion
|
|
98
|
+
//#region src/http/undici-retry.d.ts
|
|
99
|
+
/**
|
|
100
|
+
* This document is one request through a `RetryAgent` of undici 8.12.2: the retries of a reply
|
|
101
|
+
* whose status is retryable, for example 429 or 503. Each fact comes from the published package at
|
|
102
|
+
* 8.12.2, with the file and the line. The defaults are 5 retries, a backoff from 500 ms with a factor
|
|
103
|
+
* of 2, a cap of 30 s, and Retry-After read.
|
|
104
|
+
*
|
|
105
|
+
* - The delay of a retry is the Retry-After of the reply, capped by `maxTimeout`. A Retry-After
|
|
106
|
+
* longer than the cap does not stop the retries: the retry comes early. A reply without
|
|
107
|
+
* Retry-After gets the backoff, with no jitter.
|
|
108
|
+
* - The agent gives up after `maxRetries` retries. The caller then gets `RequestRetryError`, with
|
|
109
|
+
* the status of the last reply. Thus the retry window of the caller is the sum of the delays.
|
|
110
|
+
* - A POST and a PATCH are not retried.
|
|
111
|
+
* - The delay is a native Node timer. It arms after the parse of the whole reply, thus it comes after
|
|
112
|
+
* the last segment by the handling time of the program. No source bounds that time, and this
|
|
113
|
+
* document does not hold it. The cells add it from a calibration (`HANDLING` in
|
|
114
|
+
* `packages/cells/src/http/race.ts`).
|
|
115
|
+
*
|
|
116
|
+
* The plain `Client` and `fetch` of undici, and the `fetch` of Node 24.21.0 (undici 7.29.1), send no
|
|
117
|
+
* request again for a status. Their retry window is 0.
|
|
118
|
+
*/
|
|
119
|
+
export declare const UNDICI_RETRY: Machine;
|
|
120
|
+
//#endregion
|
|
98
121
|
//#region src/ioredis-sentinel.d.ts
|
|
99
122
|
/**
|
|
100
123
|
* This document is the Sentinel path of ioredis 6.0.0. It tells how ioredis finds the primary of a
|
|
@@ -400,6 +423,29 @@ export declare const CADDY_HTTP2: Machine;
|
|
|
400
423
|
*/
|
|
401
424
|
export declare const ENVOY_HTTP2: Machine;
|
|
402
425
|
//#endregion
|
|
426
|
+
//#region src/proxy/nginx.d.ts
|
|
427
|
+
/**
|
|
428
|
+
* This document is nginx 1.29.6 as an HTTP/2 proxy of gRPC, for one connection of a client. Its
|
|
429
|
+
* configuration is the one of the harness: one worker (the default), one server of h2c, and `grpc_pass`
|
|
430
|
+
* to one address with no `upstream {}` block. Each other directive is at its built-in default, not at the
|
|
431
|
+
* values of the stock nginx.conf (keepalive_timeout 65 and worker_processes auto).
|
|
432
|
+
*
|
|
433
|
+
* - With no stream open for 75 s (keepalive_timeout), nginx sends GOAWAY NO_ERROR, then a FIN, and it
|
|
434
|
+
* reads and drops the input for at most 30 s (the lingering close). A PING does not reset that timer.
|
|
435
|
+
* - While a stream is open, the connection of the client has no timer. The only timer of a call is
|
|
436
|
+
* grpc_read_timeout (60 s) on the upstream socket, from the send of the request. When it fires before
|
|
437
|
+
* the headers of the response, the client gets 504 with no gRPC status, thus UNAVAILABLE. After them,
|
|
438
|
+
* RST_STREAM INTERNAL_ERROR. nginx does not retry a call that it sent.
|
|
439
|
+
* - Each call has its own upstream connection, which ends with the call.
|
|
440
|
+
* - A stopped worker: the timers that came due during the stop fire at the resume. They read one clock,
|
|
441
|
+
* which nginx reads after each wait of epoll_wait. After a stop and a continue, that wait fails with
|
|
442
|
+
* EINTR (signal(7)). Then nginx fires its timers before it reads any I/O. Thus a stop longer than
|
|
443
|
+
* grpc_read_timeout gives 504, also when the reply of the server waits in the socket.
|
|
444
|
+
* - SIGQUIT and SIGHUP send GOAWAY NO_ERROR, and the worker waits for each stream. SIGTERM exits with
|
|
445
|
+
* no GOAWAY.
|
|
446
|
+
*/
|
|
447
|
+
export declare const NGINX_GRPC: Machine;
|
|
448
|
+
//#endregion
|
|
403
449
|
//#region src/proxy/tcp-proxies.d.ts
|
|
404
450
|
/**
|
|
405
451
|
* This document is one proxied connection of Toxiproxy 2.12.0, with no toxic. Toxiproxy copies TCP, and it
|