-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
support backoff between retries in tcp_proxy #37709
base: main
Are you sure you want to change the base?
support backoff between retries in tcp_proxy #37709
Conversation
Signed-off-by: Issa Abu Kalbein <[email protected]>
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
Signed-off-by: Issa Abu Kalbein <[email protected]>
Signed-off-by: Issa Abu Kalbein <[email protected]>
Signed-off-by: Issa Abu Kalbein <[email protected]>
Signed-off-by: IssaAbuKalbein <[email protected]>
/retest |
Signed-off-by: Issa Abu Kalbein <[email protected]>
Signed-off-by: IssaAbuKalbein <[email protected]>
/retest |
Signed-off-by: IssaAbuKalbein <[email protected]>
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Left a couple of API comments.
I suggest breaking this down to 2 PRs, one for TCP-Proxy, and the other for UDP-Proxy.
api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto
Outdated
Show resolved
Hide resolved
message RetryOptions { | ||
// The maximum number of unsuccessful connection attempts that will be made before giving up. | ||
// If the parameter is not specified, 1 connection attempt will be made. | ||
google.protobuf.UInt32Value max_connect_attempts = 1; | ||
|
||
// Sets the backoff strategy. If not set, the retries are performed without backoff. | ||
config.core.v3.BackoffStrategy backoff_options = 2; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of deprecating the old max_connect_attempts
field, I suggest adding the backoff_options
directly to the parent's message.
In an ideal world, where all the servers and clients under the control of a single entity, it would probably be possible to refactor the API so fields that are coupled will live in the same sub-type. However, unfortunately in our case, the costs outweigh the benefits, and unless there's a good reason for this refactor, I don't think it adds any new feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this refactor to align tcp_proxy config with udp_proxy, do you still think it will be better to add backoff_options directly to the parent's message?
/wait |
Signed-off-by: Issa Abu Kalbein <[email protected]>
Created a separate PR for udp_proxy: #37912 |
Signed-off-by: Issa Abu Kalbein <[email protected]>
Signed-off-by: IssaAbuKalbein <[email protected]>
Commit Message: support backoff between retries in tcp_proxy
Additional Description: This feature also fixes a bug in the retry mechanism in tcp proxy in the following situation:
Risk Level: medium
Testing: unit tests, integration tests
Docs Changes: added
Release Notes: added