Skip to content

HTTP2: Inbound flow control - default settings vs. adaptive algorithm #1587

Closed

Description

@geoffkizer

[EDIT] We need to decide if we want to expose just default setting, or if we want to do something fancier (adaptive algorithm) and how it would interact with such setting (or we can skip the setting).

HTTP2 allows us to define our window size using the SETTINGS_INITIAL_WINDOW_SIZE setting. The default is 64K.
Currently we simply always use the default. Should we expose a setting to control this?
Note that this setting would basically control the receive buffer size for a response body.
Flow control is managed both per-stream and per-connection, but the interesting case here is per-stream.

Merged with issue dotnet/corefx#35388:
[EDIT] Pipelines has some logic already to reach an optimal receive window -- should we leverage that?

Currently, our stream-level response window is 64K (the default). This is probably too small for many scenarios, and will end up stalling the server as it sends response data.
We should increase this, but it's not clear what the right amount is. Further perf investigation is needed here.
As part of this, we should probably switch our response buffering strategy from using a single array buffer to using linked buffers that are allocated from the pool.

Activity

  1. karelz commented on Feb 27, 2019

    @karelz
    Member

    Related to dotnet/corefx#35388
    It is an escape route if we don't get defaults right + involves new API. Not critical for 3.0 at this moment.

  2. Tratcher commented on Sep 23, 2019

    @Tratcher
    Member

    Yes these should be configurable in case people run into throughput or memory issues.

  3. scalablecory commented on Sep 24, 2019

    @scalablecory
    Contributor

    I think we can let the user configure a maximum receive window size, and then implement some logic to auto-discover it.

  4. changed the title [-]HTTP2: Should we expose settings on SocketsHttpHandler for inbound flow control?[/-] [+]HTTP2: Inbound flow control - default settings vs. adaptive algorithm[/+] on Oct 8, 2019
  5. karelz commented on Oct 8, 2019

    @karelz
    Member

    Triage: We should explore what winsock does.

  6. self-assigned this
    on Oct 16, 2019
  7. scalablecory commented on Nov 4, 2019

    @scalablecory
    Contributor
  8. transferred this issue fromdotnet/corefxon Jan 9, 2020
  9. added
    untriaged
    on Jan 9, 2020
  10. added
    api-suggestion
    on Jan 9, 2020
  11. removed
    untriaged
    on Feb 13, 2020
  12. added this to the Future milestone on Feb 13, 2020
  13. modified the milestones: Future, 6.0.0 on Aug 31, 2021
  14. antonfirsov commented on Aug 31, 2021

    @antonfirsov
    Contributor

    Fixed in #54755.

  15. ghost locked as resolved and limited conversation to collaborators on Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api-suggestionarea-System.Net.Http

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions