rwynn / monstache

a go daemon that syncs MongoDB to Elasticsearch in realtime. you know, for search.
https://rwynn.github.io/monstache-site/
MIT License
1.29k stars 182 forks source link

Changes in MongoDB are sometimes slow to reflect. #639

Open lineaheshsh opened 2 years ago

lineaheshsh commented 2 years ago

Hi rwynn.

Changes in MongoDB are sometimes slow to reflect?

For example, data came into MongoDB at 9:00, but was reflected in Elasticsearch at 11:00.

At that time, there were about 1 million data changes.

mongo-url = "mongodb://user:passwd@ip:port/database?authSource=admin"

elasticsearch-urls = ["http://ip:port","http://ip:port","http://ip:port"]
elasticsearch-max-conns = 4
elasticsearch-max-seconds = 5
elasticsearch-max-bytes = 8000000

namespace-regex = '^database\.'
change-stream-namespaces = ["database.A", "database.B", "database.C"]
direct-read-namespaces = ["database.A", "database.B", "database.C"]

dropped-collections = false
dropped-databases = false

gzip = true
verbose = true
resume = true
resume-name = "t_prd"
resume-strategy = 0
resume-from-timestamp = 0
mapper-plugin-path = "/bin/plugin.so"

[[mapping]]
namespace = "database.A"
index = "A"

[[mapping]]
namespace = "database.B"
index = "B"

[[mapping]]
namespace = "database.C"
index = "C"
giangnth commented 2 years ago

can you share some additional info on this?

CPU, IO on MongoDB and ElasticSearch?