-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Change the built-in HTTP request validation to no longer use @kbn/config-schema #78353
Comments
Pinging @elastic/kibana-platform (Team:Platform) |
For information, even if we don't provide an alternative to config-schema, it is currently already possible to use a custom validation function for routing: kibana/src/core/server/http/router/validator/validator.ts Lines 98 to 114 in f593455
kibana/src/core/server/http/router/validator/validator.ts Lines 61 to 72 in f593455
|
Duplicate of #78351 |
At the moment,
@kbn/config-schema
is slow because Joi is admittedly slow, and not focused on increasing performance in the short-term: hapijs/joi#2340 (comment).While performing some performance profiling for Fleet, I'm seeing around 6% of the total CPU time being spent validating the request. This CPU profile was captured after changing Fleet's custom route handling to no longer use
@kbn/config-schema
and almost all of the cost comes from the built-in HTTP request validation being dependent on Joi:Prior to figuring out how to how to increase the performance of @kbn/config-schema, which is being tracked by #78351, we could potentially change the build-in HTTP request validation to no longer be based on
@kbn/config-schema
.The text was updated successfully, but these errors were encountered: