Sample Header Ad - 728x90

Secondary indexes vs Using elastic search

1 vote
1 answer
442 views
When does it make sense to put data in elastic search vs creating secondary indexing on Primary datastore? Elastic search with another primary store Pros: 1. Primary datastore can be optimised for read write usecases. 2. Elastic search suports more than just key value matching like fuzzy match, etc. Cons: 1. Out of sync with primary datastore 2. two more component to manage (ES as well a pipeline to insert in ES) 3. Would need some sort of Change data capture capability from Primary datastore. Secondary indexes on Primary datastore Pros: 1. Less moving parts. 2. Less consistency issues ( because secondary indexes can be eventually consistant) Cons 1. Not all datastore support secondary indexing 2. Secondary index queries are more oftan scatter gather, doing it on higher QPS will limit read write qps on primary access patterns like read, write by PK Are there other considerations while deciding this?
Asked by best wishes (113 rep)
Mar 25, 2023, 08:37 AM
Last activity: Mar 26, 2023, 12:50 PM