-
Notifications
You must be signed in to change notification settings - Fork 979
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
[Application config] Usage and performance optimization #6300
Comments
@tianleh Would you like to take a look as you were the author of the related PR? cc @seraphjiang |
checking |
+1 @SuZhou-Joe, @tianleh. I think this should be a prioritization maybe even worth a patch for 2.13. If anyone is using this already. As @SuZhou-Joe said I think we can utilize the storage service (which basically saves it it to local storage). If local storage does not contain the expect key then do the call dynamic app config. On app load we can do the update regardless and then subsequent requests will pull from local storage. |
@kavilla Yes, for browser side we can do that but as the application config is a service for server side, I suppose we need to figure out a way to cache in server side as well. |
Created a RFC for the performance concern #6341 Please review the proposal in the RFC |
how about this? could we have quick fix ? |
It was implemented in such way to leverage the scoped client for permission check. I will run some experiments of the suggestion to |
Address both comments in this PR https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6364/files |
Is your feature request related to a problem? Please describe.
Issue 1: required parameters for
getConfigurationClient
functionThe getConfigurationClient method requires a scopedClusterClient to return the applicationConfigClient, but applicationConfig is supposed to be a generic config interface, which should not be related to opensearch.
Issue 2: Performance concern on application config
The applicationClient.get is a async method which will fetch the doc inside
.opensearch-config
index. workspace or other plugins will leverage this service to get thedynamic application settings
. In order to get latest config, plugins will call the function every time when there is a incoming request to handle, which may introduce a huge workload to the target storage.Describe the solution you'd like
required parameters for
getConfigurationClient
functionChange the required param to
request: OpensearchDashboardRequest
and construct the scopedClusterClient within OpenSearchConfigurationClient so that the implementation of the ConfigurationClient will be totally transparent to other plugins.Performance concern on application config
Add cache within application config. As for normal user case, user can only mutate the config through
application.updateEntityConfig
method, we can add a cache in memory to reduce the unnecessary call to the real storage service.Describe alternatives you've considered
N/A
Additional context
#5855
The text was updated successfully, but these errors were encountered: