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
Post a Comment