Performance of retrieving last node run reports time impact both compliance and list of node screen
As soon as we want to display information about a node or about compliance (that is, almost any page on Rudder), we start by retrieving the last execution run that we received on Rudder for that node, which allows to know when the node was last seen, and what config id it applied on that run.
That information is generally quite quick to get, but it in big system (several hunderd of nodes), it may take as long as 500ms. Which is a high price to pay on almost anything we want to do.
Moreover, that information is very easy to cache (its size is at most the number of nodes * a couple of stat (a date, a configid), so a couple of thousand entries in huge Rudder installation - really small) and the cache unvalidation is trivial since we already DO have a batch to process new runs.
Updated by François ARMAND over 6 years ago
- Status changed from 8 to Pending technical review
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/760
There is nothing fancy here, I believe it's intersting to have Vincent look at that one, it's a good example of what allows the service arch we are using (no, it's not to have couple of MyTrait/MyTraitImpl all over the place)