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

http2: make maximum invalid frames and maximum rejected streams configurable #30534

Closed

Conversation

@lundibundi
Copy link
Member

lundibundi commented Nov 18, 2019

http2: replace direct array usage with struct for js_fields_

http2: allow to configure maximum tolerated invalid frames

test: update and harden http2-reset-flood

  • use new maxSessionInvalidFrames to lower the needed frames
  • slow down requests to generate less redundant after-session-close
    requests

http2: make maximum tolerated rejected streams configurable

Closes: #30505
This should also decrease the flakiness of test-http2-reset-flood.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Also, do we have a dedicated test for argument validation of createServer? I'm not sure where to put them.

/cc @nodejs/http2

@nodejs-github-bot

This comment has been minimized.

doc/api/http2.md Outdated Show resolved Hide resolved
doc/api/http2.md Outdated Show resolved Hide resolved
@ZYSzys

This comment has been minimized.

Copy link
Member

ZYSzys commented Nov 19, 2019

Also, do we have a dedicated test for argument validation of createServer? I'm not sure where to put them.

Seem like we actually don't have a dedicated test for argument validation of createServer, but we test things like this by adding a new test file called test-http2-too-many-*.js.

Maybe add a new test and name it as test-http2-too-many-invalid-frame.js is suitable here.

@ZYSzys ZYSzys added the http2 label Nov 19, 2019
lib/internal/http2/core.js Outdated Show resolved Hide resolved
@lundibundi lundibundi force-pushed the lundibundi:http2-invalid-frames-i30505 branch from 53d5a16 to f132068 Nov 19, 2019
@lundibundi

This comment has been minimized.

Copy link
Member Author

lundibundi commented Nov 19, 2019

Added dedicated test for maxSessionInvalidFrames that should be more reliable.
Added simple options validation testing for createServer/createSecureServer.
Fixed missing changelog for maxSessionRejectedStreams option.

@nodejs-github-bot

This comment has been minimized.

Copy link
Member

addaleax left a comment

Still LGTM

lundibundi added 4 commits Nov 18, 2019
* use new maxSessionInvalidFrames to lower the needed frames
* slow down requests to generate less redundant after-session-close
  requests
@lundibundi lundibundi force-pushed the lundibundi:http2-invalid-frames-i30505 branch from f132068 to b9c679c Nov 22, 2019
@nodejs-github-bot

This comment has been minimized.

@lundibundi

This comment has been minimized.

Copy link
Member Author

lundibundi commented Nov 22, 2019

(nothing changed, force pushed to resolve conflicts)

Copy link
Contributor

vsemozhetbyt left a comment

Some doc nits.

doc/api/http2.md Outdated Show resolved Hide resolved
doc/api/http2.md Outdated Show resolved Hide resolved
doc/api/http2.md Outdated Show resolved Hide resolved
doc/api/http2.md Outdated Show resolved Hide resolved
lundibundi added 2 commits Nov 23, 2019
@lundibundi

This comment has been minimized.

Copy link
Member Author

lundibundi commented Nov 23, 2019

@vsemozhetbyt done, thanks.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@lundibundi lundibundi mentioned this pull request Nov 27, 2019
3 of 3 tasks complete
@addaleax

This comment has been minimized.

Copy link
Member

addaleax commented Nov 27, 2019

Landed in 10f5fa7...988034b 🎉

addaleax added a commit that referenced this pull request Nov 27, 2019
PR-URL: #30534
Fixes: #30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@addaleax addaleax closed this Nov 27, 2019
addaleax added a commit that referenced this pull request Nov 27, 2019
PR-URL: #30534
Fixes: #30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this pull request Nov 27, 2019
* use new maxSessionInvalidFrames to lower the needed frames
* slow down requests to generate less redundant after-session-close
  requests

PR-URL: #30534
Fixes: #30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this pull request Nov 27, 2019
PR-URL: #30534
Fixes: #30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this pull request Nov 30, 2019
PR-URL: #30534
Fixes: #30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this pull request Nov 30, 2019
PR-URL: #30534
Fixes: #30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this pull request Nov 30, 2019
* use new maxSessionInvalidFrames to lower the needed frames
* slow down requests to generate less redundant after-session-close
  requests

PR-URL: #30534
Fixes: #30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this pull request Nov 30, 2019
PR-URL: #30534
Fixes: #30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
bmeck added a commit to bmeck/node that referenced this pull request Dec 2, 2019
PR-URL: nodejs#30534
Fixes: nodejs#30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
bmeck added a commit to bmeck/node that referenced this pull request Dec 2, 2019
PR-URL: nodejs#30534
Fixes: nodejs#30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
bmeck added a commit to bmeck/node that referenced this pull request Dec 2, 2019
* use new maxSessionInvalidFrames to lower the needed frames
* slow down requests to generate less redundant after-session-close
  requests

PR-URL: nodejs#30534
Fixes: nodejs#30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
bmeck added a commit to bmeck/node that referenced this pull request Dec 2, 2019
PR-URL: nodejs#30534
Fixes: nodejs#30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeAR BridgeAR mentioned this pull request Dec 3, 2019
BridgeAR added a commit that referenced this pull request Dec 3, 2019
Notable changes:

* http:
  * Make maximum header size configurable per-stream or per-server
    (Anna Henningsen) #30570
* http2:
  * Make maximum tolerated rejected streams configurable (Denys
    Otrishko) #30534
  * Allow to configure maximum tolerated invalid frames (Denys
    Otrishko) #30534
* wasi:
  * Introduce initial WASI support (cjihrig)
    #30258

PR-URL: #30774
BridgeAR added a commit that referenced this pull request Dec 3, 2019
Notable changes:

* fs:
  * Reworked experimental recursive `rmdir()`  (cjihrig)
    #30644
    * The `maxBusyTries` option is renamed to `maxRetries`, and its
      default is set to 0. The `emfileWait` option has been removed,
      and `EMFILE` errors use the same retry logic as other errors.
      The `retryDelay` option is now supported. `ENFILE` errors are
      now retried.
* http:
  * Make maximum header size configurable per-stream or per-server
    (Anna Henningsen) #30570
* http2:
  * Make maximum tolerated rejected streams configurable (Denys
    Otrishko) #30534
  * Allow to configure maximum tolerated invalid frames (Denys
    Otrishko) #30534
* wasi:
  * Introduce initial WASI support (cjihrig)
    #30258

PR-URL: #30774
BridgeAR added a commit that referenced this pull request Dec 3, 2019
Notable changes:

* fs:
  * Reworked experimental recursive `rmdir()`  (cjihrig)
    #30644
    * The `maxBusyTries` option is renamed to `maxRetries`, and its
      default is set to 0. The `emfileWait` option has been removed,
      and `EMFILE` errors use the same retry logic as other errors.
      The `retryDelay` option is now supported. `ENFILE` errors are
      now retried.
* http:
  * Make maximum header size configurable per-stream or per-server
    (Anna Henningsen) #30570
* http2:
  * Make maximum tolerated rejected streams configurable (Denys
    Otrishko) #30534
  * Allow to configure maximum tolerated invalid frames (Denys
    Otrishko) #30534
* wasi:
  * Introduce initial WASI support (cjihrig)
    #30258

PR-URL: #30774
Sebastien-Ahkrin added a commit to Sebastien-Ahkrin/node that referenced this pull request Dec 11, 2019
PR-URL: nodejs#30534
Fixes: nodejs#30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sebastien-Ahkrin added a commit to Sebastien-Ahkrin/node that referenced this pull request Dec 11, 2019
PR-URL: nodejs#30534
Fixes: nodejs#30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sebastien-Ahkrin added a commit to Sebastien-Ahkrin/node that referenced this pull request Dec 11, 2019
* use new maxSessionInvalidFrames to lower the needed frames
* slow down requests to generate less redundant after-session-close
  requests

PR-URL: nodejs#30534
Fixes: nodejs#30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sebastien-Ahkrin added a commit to Sebastien-Ahkrin/node that referenced this pull request Dec 11, 2019
PR-URL: nodejs#30534
Fixes: nodejs#30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sebastien-Ahkrin added a commit to Sebastien-Ahkrin/node that referenced this pull request Dec 11, 2019
Notable changes:

* fs:
  * Reworked experimental recursive `rmdir()`  (cjihrig)
    nodejs#30644
    * The `maxBusyTries` option is renamed to `maxRetries`, and its
      default is set to 0. The `emfileWait` option has been removed,
      and `EMFILE` errors use the same retry logic as other errors.
      The `retryDelay` option is now supported. `ENFILE` errors are
      now retried.
* http:
  * Make maximum header size configurable per-stream or per-server
    (Anna Henningsen) nodejs#30570
* http2:
  * Make maximum tolerated rejected streams configurable (Denys
    Otrishko) nodejs#30534
  * Allow to configure maximum tolerated invalid frames (Denys
    Otrishko) nodejs#30534
* wasi:
  * Introduce initial WASI support (cjihrig)
    nodejs#30258

PR-URL: nodejs#30774
targos added a commit that referenced this pull request Jan 13, 2020
PR-URL: #30534
Fixes: #30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos added a commit that referenced this pull request Jan 13, 2020
PR-URL: #30534
Fixes: #30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos added a commit that referenced this pull request Jan 13, 2020
* use new maxSessionInvalidFrames to lower the needed frames
* slow down requests to generate less redundant after-session-close
  requests

PR-URL: #30534
Fixes: #30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos added a commit that referenced this pull request Jan 13, 2020
PR-URL: #30534
Fixes: #30505
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@sxa555 sxa555 mentioned this pull request Jan 21, 2020
2 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.