Skip to content

lib feature request: option to disable keeping closed streams #810

@mattklein123

Description

@mattklein123

In Envoy, we create a large mesh of http/2 connections. I've noticed that a considerable amount of process memory is actually holding on to closed streams (> 80% of memory in some scenarios). Currently, we don't use priority at all for these connections, so the memory is a waste, but worse, it scales with the number of active connections and not total concurrent streams handled by the server.

I'm honestly quite hazy on the spec and the implementation in this area. I roughly understand that previous streams are kept around up to some concurrency level to help with dependency calculation for the priority tree. So I guess a few questions:

  1. If we know we are not using priority at all, could there be a way to disable this functionality to avoid the memory use?
  2. If (1) is not possible, is there anything we can do to decrease the memory requirements for the kept streams? (For example, just keep a very small amount of data needed for the calculation).

I'm mostly just trying to understand all of the issues at play here.

Thanks,
Matt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions