postgresql - What is the best way to sync Postgres and ElasticSearch? -


i have choice sync es latest changes on postgres db

1- postgres listen / notify :

i should create trigger -> use pg_notify -> , create listener in separated service.

2- async queries es :

i can update elasticsearch asynchronously after change on db. ie:

model.save().then(() => {model.savees() }).catch()

which 1 scale best ?

ps: tried zombodb in production doesn’t goes well, slows down production.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -