Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: KV Connect protocol spec #6

Merged
merged 2 commits into from
Oct 30, 2023
Merged

feat: KV Connect protocol spec #6

merged 2 commits into from
Oct 30, 2023

Conversation

lucacasonato
Copy link
Member

This commit adds a proper spec for the KV Connect protocol.

proto/kv-connect.md Show resolved Hide resolved
proto/kv-connect.md Show resolved Hide resolved
proto/kv-connect.md Outdated Show resolved Hide resolved
proto/kv-connect.md Outdated Show resolved Hide resolved
proto/kv-connect.md Outdated Show resolved Hide resolved
Comment on lines +257 to +259
The server MAY perform quota checks on the request. If the request is rejected
due to quota limits, the server MUST respond with a 4xx class response and a
plain text body containing a human readable error message.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about rate limiting?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a note to the paragraph above about using 5xx responses for rate limiting, as those are retried with backoff.

exponential backoff strategy with unlimited retries.

The client MUST verify that the response is a 200 OK response. If the response
is a 4xx class error response, the client MUST fatally abort the request and
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment to above about rate limiting. Should the server be able to respond with 429? and should the client interpret that as retry with backoff?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the server should respond with a 503 then. It's easier if 4xx == never retry, and 5xx == retry with backoff.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be a mechanism to "gracefully" rate limit, like starting to throttle at 90% of the limit and when it reaches 100% wait until the end of the rate limit window

proto/kv-connect.md Show resolved Hide resolved
@lucacasonato lucacasonato merged commit ba84c38 into main Oct 30, 2023
1 check passed
@lucacasonato lucacasonato deleted the spec branch October 30, 2023 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants