| Depends on what you're articulating with your dashboard but sometimes I find it useful to flip it around. For example at my job we have a dashboard that displays a big wall of CI/CD pipeline statuses for a bunch of repos. A row for each project and a column for each environment. Green/Red/Yellow per stage etc. Very helpful to keep track of things at a glance. Everyone uses is with a bookmark on their own machine, not a TV or anything. It was thrown together initially to make the "calculation" of all the statuses on every request. As we added more repos/environments the request time grew approaching 30s per request. Once it went over that it was breaking point as we were hitting 30s timeouts in AWS API Gateway, so you would get timeout errors half of the time instead of just a really slow loading page. Disaster! There was a lot of duplication of work, if you hit the page twice at the same time it would go and find the same data on it's own, and it would come back with the same answer. It was also taking 30s~ for the page to load. Another consideration is that people don't need to the second accuracy. They can only get 30s old data now anyway so that's a good place to start. In this case the solution was to break it up into worker thread, who's job it to find the latest status of everything. This can be sped up independently (think another worker per environment etc). This would just run in a big loop and constantly "cache" the latest view of the data. At it's fastest this refreshing every 4-5s, but the real bottleneck was actually getting rate limited on the AWS API. So in reality to stop us from hitting rate limit errors constantly be scaled it back so it's updating every 30s ish. The requests are then much lighter, and are just reading the lastest view of the data from memory/cache (back down to XXms from XXs). People are happy as the page is back to being snappy. To help UX I also added a small UI element to let them know how fresh the data is with a "Last updated X seconds/minutes ago" as a transparent label in the corner that you can hover over to make opaque. In your case think about how live the data really needs to be? Is it the trends over time that are more interesting? Would a "daily" update be enough? Hourly? Suddenly that 2 minute load isn't a big deal anymore when it's being run once a day. |