-
Notifications
You must be signed in to change notification settings - Fork 30
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: expose HTTP timeout on AIServiceBackend #384
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Loong <[email protected]>
I will add tests if basic logic is OK. @yuzisun please take a look. |
Signed-off-by: Loong <[email protected]>
Signed-off-by: Loong <[email protected]>
Signed-off-by: Loong <[email protected]>
@@ -675,3 +680,14 @@ func backendSecurityPolicyVolumeName(ruleIndex, backendRefIndex int, name string | |||
func backendSecurityMountPath(backendSecurityPolicyKey string) string { | |||
return fmt.Sprintf("%s/%s", mountedExtProcSecretPath, backendSecurityPolicyKey) | |||
} | |||
|
|||
func defaultTimeout() *gwapiv1.HTTPRouteTimeouts { |
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.
Do not find a good timing to set default value, put here for discussion.
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.
This is the default timeout for the default route, for the other routes it is still going to default to 15s which is the envoy default timeout if not specified.
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.
@mathetake Do we really need this default route?
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.
the / is unfortunately necessary as without it, any request will result in 404; envoy router executes before extproc once at the very first phase of request handling, and 404 will be returned before it reaches extproc. However, in reality it should never be used since if the extproc router doesn’t find any match, extproc will return 404 immediate response, not routing to default backend.
so to deal with it in the PR, i don’t think we need to do anything- just leave it as default without setting
my comment from slack; tldr is the default route is an implementation detail that shouldn't be used or have any impact on the behavior users expect. So i would suggest to just remove this defaultTimeout
and leave it nil and make it default to the envoy default
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.
Get.
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.
let's remove defaultTimeout and I think we are good to go
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.
OK.
Commit Message
This adds timeouts field on AIServiceBackend to allow the configuration of timeouts per backend.
Related Issues/PRs (if applicable)
Fixes #361