We have a relational main data source for which we established an ELS to leverage its search capabilities.
The data stored in RDB frequently needs update. My question is this, to reflect those updates in the ELS, are we allowed (from the performance point of view) to call ELS update per each change in the original data (in RDB) or for example cache the changes and call ELS for reflecting changes in an interval or something like that?
What is the best practice?
Thanks in advance
As always, every workload scenario is different - however, I would say that it is perfectly feasible to do so. The "best practice" is whatever your system needs.
I run a couple of Django sites (not super high traffic or load, mind you) where we do precisely this. Any time a Django 'model' is saved, an attached 'signal' is called that triggers an update to its corresponding document in Elasticsearch.
Honestly, I'd try it out. Depending on your system load/traffic, you might need to push the ES doc update to a background thread or separate task. But it is definitely possible.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.