Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

Grot cannot remember your choice unless you click the consent notice at the bottom.

Reduce costs and increase performance with query caching in Grafana Cloud

Reduce costs and increase performance with query caching in Grafana Cloud

2 Sep, 2021 3 min

We are excited to announce the launch of query caching in Grafana Cloud, which can significantly reduce load times and costs of your most popular Grafana dashboards. 

Now, when the same query is submitted repeatedly, the results will come back from the cache rather than the data source itself. This not only lowers load times for popular dashboards, but will also reduce API costs for your data sources and decrease the likelihood that those APIs will rate-limit or throttle requests. 

Here’s one common scenario in which query caching can have a great impact on organizations. For many of our users, Black Friday and Cyber Monday are the busiest days of the year, when dashboards are being viewed by everyone across the org. On these mission-critical days, it’s vital that time is not lost waiting for a dashboard to load. With query caching:

  • The total wait time can be reduced by 79.2% across 100 team members for a dashboard that takes 5 seconds to load. 
  • After the first person loads the dashboard, all subsequent load times go down to just 1 second
  • This will also reduce the operational costs for the day, by lowering the number of API calls by 99%

How to enable query caching

In order to use query caching, you must enable it in the data source itself. All Grafana Enterprise data sources and the following built-in data sources support query caching:

  • CloudWatch
  • Google Cloud Monitoring
  • InfluxDB
  • Microsoft SQL Server
  • MySQL
  • Postgres
  • Tempo

To enable query caching on a supported data source, navigate to the data source and click on the Cache tab. (If the cache tab is not shown, the data source does not support caching.) Within the cache tab, click Enable.

Once the feature is enabled, you can choose how often the data should be refreshed by updating the Time to Live (TTL) or by keeping the default TTL of 5 minutes. If you want a data source to have a long time to live, but want a particular panel in a dashboard to refresh more often, you can do that too! Simply increase the Max Data Points in the panel’s query options.

You’ll notice an information icon showing up next to the title of the panel, indicating that it is showing a cached response. 

From there, enjoy the faster dashboard load times and lower API costs! 

Get started

Query caching is available now for all Grafana Cloud Pro and Advanced users. If you’re not already using Grafana Cloud Pro or Advanced, sign up now for your free 14-day Pro trial or upgrade your subscription in the cloud portal under Billing/Manage Subscriptions.

Stay tuned for more content on new and exciting features coming to the Grafana Cloud Pro and Advanced tiers. And tell us what you’d like to see! You can chat with the Cloud team on our Grafana Cloud Community Slack.

On this page
Scroll for more