Server-Side Protocol Version Restriction (RESP2/RESP3)
- Dominant language
- C#
- Stars
- 12k
- Forks
- 703
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 36
Description
### Feature request type
## Summary
Add ability to restrict which RESP protocol versions (RESP2 or RESP3) clients can use when connecting to Garnet server.
## Motivation
### Business Use Case
In enterprise environments, organizations need to:
- **Enforce standardization** across client applications
- **Control protocol upgrades** in a phased manner
- **Prevent legacy clients** from connecting to RESP3-only infrastructure
- **Ensure compatibility** by blocking RESP3 clients when infrastructure doesn't support it
- **Security compliance** - some policies require specific protocol versions
### Current Limitation
Currently, Garnet accepts both RESP2 and RESP3 connections without restriction. The protocol is negotiated by the client via the `HELLO` command, and the server always accepts the client's preference.
**Problem:** Server administrators have no way to enforce protocol version policies.
### Describe the solution you'd like
## Proposed Solution
### Command-Line Arguments
Add new command-line parameters to restrict protocol versions:
GarnetServer --allowed-protocols RESP3 # RESP3 only GarnetServer --allowed-protocols RESP2 # RESP2 only GarnetServer --allowed-protocols BOTH # Both (default)
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating GarnetServer's command-line argument parsing and the HELLO command's RESP version negotiation path. Trace how the default accepts both RESP2 and RESP3, then define enforcement for RESP2-only, RESP3-only, and the default BOTH mode; done means disallowed client protocol selections are rejected while allowed selections continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100