Skip to content

feat(config): Expose inflight_requests_limit in ConnectionConfiguration #484

Description

@currantw

Describe the feature

The inflight_requests_limit configuration option is supported by glide-core and exposed in the Python and Java GLIDE clients, but is not yet surfaced in the C# client's ConnectionConfiguration.

In rust/src/ffi.rs, the field is hardcoded to None:

inflight_requests_limit: None,

The C# ConnectionConfig FFI struct does not include this field, and there is no corresponding builder method in ConnectionConfiguration.

Use Case

Users need to control the maximum number of concurrent in-flight requests to the server. This is important for:

  • Preventing client-side resource exhaustion under high load
  • Matching the behavior available in other GLIDE clients (Python, Java)
  • Tuning performance for specific workload patterns

Proposed Solution

  • Add inflight_requests_limit field to the C# ConnectionConfig FFI struct in FFI.structs.cs
  • Add a WithInflightRequestsLimit(uint limit) builder method to ConnectionConfiguration (both standalone and cluster builders)
  • Pass the value through to glide-core in ffi.rs
  • Add unit test for the configuration option

References:

  • Python: glide_shared/config.pyinflight_requests_limit: Optional[int]
  • Java: BaseClientConfiguration.javaprivate final Integer inflightRequestsLimit
  • glide-core protobuf: connection_request.ConnectionRequest.inflight_requests_limit (uint32)

Related

Additional Information

This applies to both standalone and cluster client configurations (same as Java's BaseClientConfiguration).

Metadata

Metadata

Assignees

Labels

coreCore library (`sources/Valkey.Glide/`)

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions