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

Feature request: Move implementation to the backend to support enterprise query caching #193

Open
marefr opened this issue Mar 14, 2023 · 1 comment

Comments

@marefr
Copy link

marefr commented Mar 14, 2023

Currently the datasource has one implementation client side that uses the Grafana datasource proxy, i.e. http://<host>/api/datasources/proxy/<ds identifier>/sql to fetch data. It also has a backend implementation which seems to only be used for supporting Grafana Alerting. Grafana also had this setup for built-in datasources, but most have now migrated to use the backend implementation from client side, i.e. /api/ds/query, and for Grafana Alerting.

Some customers have raised concerns regarding performance and loading a lot of data using this datasource and would like to be able to use Grafana Enterprise Query Caching, but it's currently not supported.

By making your datasource extend the DataSourceWithBackend instead of DataSourceApi it will support Grafana Enterprise Query Caching. Using DataSourceWithBackend will out of the box use /api/ds/query to fetch data, see example.

@sunpe
Copy link
Contributor

sunpe commented Mar 15, 2023

Thanks for your advice.
We use DataSourceWithBackend api from the beginning. Front-end dashboard queries will request back-end plugins. But there will be performance issues when there are too many queries on the front-end dashboard. If there are too many query requests, the plug-in will report a 503 error when processing. So we now use the front-end implementation to handle front-end dashboard requests.

We will try DataSourceWithBackend again in the future

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

No branches or pull requests

2 participants