Slackbot
02/27/2023, 11:58 AMOded Bd
02/27/2023, 12:34 PMAndrii Kasparevych
02/27/2023, 1:21 PMAndrii Kasparevych
02/27/2023, 1:23 PMOr Weis
02/27/2023, 2:11 PMOr Weis
02/27/2023, 2:20 PMAs you can imagine, those datasets that needed to be cached can grow huge. How to optimize that? How much data is recommended to store in OPA/L’s cache?This highly depends on your setup - but as a rule of thumb stick to ideally below 1 GB, 2 GB is bearable, >5 GB OPA will fail in most cases.
Once all the data is loaded, how do I make sure it stays updated? Is it by sending new portions of data via data update triggers (like described here)? Is there a way for OPAL to poll for new data updates for each endpoint with a parameter like “lastUpdatedAt” to only get the new data?Yes, you keep things up to date by triggering updates. There’s no “lastUpdated” feature in OPAL currently - though it could make sense (You’re welcome to open a PR or issue for this). As Oded suggested you can implement something like this using a custom-data fetcher. Usually - since you can assume the agent got all the previous updates (any disconnect and the client will refetch everything from the baseline) - you can just add things sequentially without needing to know explicitly what came before. That is the common practice.
for now its more for a development time, e.g. I messed up the data or changed the OPAL_DATA_CONFIG_SOURCES in external and I want all the clients to reload the data .By restarting the server you’d achieve just that. Alternatively you can send all of the clients (by topics) a data-update that overrides everything.
and one more on top of that - what does save_method mean in the context of data source config?It’s the HTTP method that would be used on OPA when saving the data to it
Andrii Kasparevych
02/27/2023, 2:26 PMAndrii Kasparevych
02/27/2023, 2:29 PMOded Bd
02/27/2023, 2:32 PMAndrii Kasparevych
02/27/2023, 2:36 PMOr Weis
02/27/2023, 2:43 PM