Search Indexing - Decision Node
There’s 3 major ways, in order of complexity
Dual writes: Simply write to the Search service DB on every write to the regular DB**.**
*****Easy and real time, but requires an existing architecture. Can be brittle (what if the write to either service fails?), and hard to scale.*
Batch jobs: Every X frequency, save the data to the Search DB.
*Easy-ish, modular and durable, but not real time. Can be harder to debug and can lead to performance degradation.*
Database change streaming: Set up a listener to the DB for changes and permeate them.
The most scalable and adaptable approach, but hardest to set up.