0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 17:34:47 -05:00
deno/cli
Matt Mastracci 950e0e9cd6
fix(ext/http): create a graceful shutdown API (#20387)
This PR implements a graceful shutdown API for Deno.serve, allowing all
current connections to drain from the server before shutting down, while
preventing new connections from being started or new transactions on
existing connections from being created.

We split the cancellation handle into two parts: a listener handle, and
a connection handle. A graceful shutdown cancels the listener only,
while allowing the connections to drain. The connection handle aborts
all futures. If the listener handle is cancelled, we put the connections
into graceful shutdown mode, which disables keep-alive on http/1.1 and
uses http/2 mechanisms for http/2 connections.

In addition, we now guarantee that all connections are complete or
cancelled, and all resources are cleaned up when the server `finished`
promise resolves -- we use a Rust-side server refcount for this.

Performance impact: does not appear to affect basic serving performance
by more than 1% (~126k -> ~125k)

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-09-12 00:06:38 +00:00
..
args feat(cli): allow --log-level=trace for additional deep debugging (#20426) 2023-09-09 12:03:19 -06:00
bench feat: support import attributes (#20342) 2023-09-07 09:09:16 -04:00
cache feat: support import attributes (#20342) 2023-09-07 09:09:16 -04:00
js chore: speed up test name escapeing (#20439) 2023-09-10 14:07:00 +02:00
lsp fix(lsp): always enable semantic tokens responses (#20440) 2023-09-10 20:09:45 +01:00
napi chore: forward v1.36.4 to main (#20352) 2023-09-01 18:08:58 +00:00
npm feat: lockfile v3 (#20424) 2023-09-08 14:34:57 -04:00
ops build: allow disabling snapshots for dev (#20048) 2023-08-06 01:47:15 +02:00
schemas feat(ext/kv): connect to remote database (#20178) 2023-08-22 13:56:00 +08:00
standalone chore: update to Rust 1.72 (#20258) 2023-08-26 22:04:12 -06:00
tests fix(ext/http): create a graceful shutdown API (#20387) 2023-09-12 00:06:38 +00:00
tools chore: update inner #\![allow] to #[allow] (#20463) 2023-09-11 17:12:33 -06:00
tsc fix(ext/http): create a graceful shutdown API (#20387) 2023-09-12 00:06:38 +00:00
util Reland "refactor(lsp): clean up "enablePaths" handling (#20388)" (#20423) 2023-09-09 15:04:21 +01:00
auth_tokens.rs chore: upgrade to Rust 1.67 (#17548) 2023-01-27 10:43:16 -05:00
build.rs feat: TypeScript 5.2 (#20425) 2023-09-09 15:03:21 -04:00
Cargo.toml fix(ext/http): create a graceful shutdown API (#20387) 2023-09-12 00:06:38 +00:00
deno.ico fix(cli): add icon and metadata to deno.exe on Windows (#6693) 2020-07-15 21:54:38 +02:00
deno_std.rs chore: forward v1.36.4 to main (#20352) 2023-09-01 18:08:58 +00:00
emit.rs refactor(lsp): move config file related code to config.rs (#19790) 2023-07-10 21:45:09 +00:00
errors.rs feat: support import attributes (#20342) 2023-09-07 09:09:16 -04:00
factory.rs refactor: use "deno_config" crate (#20260) 2023-08-24 11:21:34 +02:00
file_fetcher.rs feat: support import attributes (#20342) 2023-09-07 09:09:16 -04:00
graph_util.rs feat: support import attributes (#20342) 2023-09-07 09:09:16 -04:00
http_util.rs feat(unstable): add more options to Deno.createHttpClient (#17385) 2023-05-21 03:43:54 +02:00
js.rs build: allow disabling snapshots for dev (#20048) 2023-08-06 01:47:15 +02:00
main.rs fix(ext/web): add stream tests to detect v8slice split bug (#20253) 2023-08-23 17:03:05 -06:00
module_loader.rs feat: support import attributes (#20342) 2023-09-07 09:09:16 -04:00
node.rs chore: rename some helpers on the Fs trait (#20097) 2023-08-08 16:28:18 -04:00
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
resolver.rs feat: support import attributes (#20342) 2023-09-07 09:09:16 -04:00
version.rs refactor: make version and user_agent &'static str (#18400) 2023-03-23 23:27:58 +01:00
worker.rs chore: update to Rust 1.72 (#20258) 2023-08-26 22:04:12 -06:00

Deno CLI Crate

crates

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core to provide the executable.