Skip to content

Try 256K HTTP/2 frames #4155

Description

@roman-khimov

Similar to #4154 we can try raising HTTP/2 frame size to 256K thus making our default read size fit into a single frame. The problem here is that it requires custom GRPC library since http2MaxFrameLen = 16384 // 16KB frame assumption is built into grpc-go. But we can advertise bigger frames and make this constant be a variable (available to change via experimental package). Of course tests need to be done here to ensure it makes sense at all, maybe even isolated non-NeoFS tests first. If it gives something noticeable we can try to push the respective change to grpc-go.

Activity

  1. added
    enhancementImproving existing functionality
    neofs-storageStorage node application issues
    performanceMore of something per second
    U2Seriously planned
    S4Routine
    I4No visible changes
    on Aug 31, 2026
  2. cthulhu-rider commented on Sep 28, 2026

    @cthulhu-rider
    Contributor

    max frame len should be configured on both client and server sides. First, i tried to increase value on server only and got:

    code = Unavailable desc = error reading from server: http2: frame too large
    
  3. cthulhu-rider commented on Sep 28, 2026

    @cthulhu-rider
    Contributor

    its worth noting that setting a limit doesn't ensure the transport of all non-tail frames of a given len. The len of the next frame is calculated dynamically, primarily based on windows: per-stream and per-conn. By default, both of them are 64K. Therefore, the first frames will be definitely less than 256K. Then, as transmission goes well, the frames increase up to the limit

    window init can be controlled via https://pkg.go.dev/google.golang.org/grpc#WithInitialWindowSize and https://pkg.go.dev/google.golang.org/grpc#WithInitialConnWindowSize options. It's also worth testing increased values (both separately and together with the frame limit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I4No visible changesS4RoutineU2Seriously plannedenhancementImproving existing functionalityneofs-storageStorage node application issuesperformanceMore of something per second

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions