
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
github.com/sebastienferry/mongo-repl
Advanced tools
This repository contains a replication tool for MongoDB databases. The goals of this tool are to keep two MongoDB databases, one source and one target, synchronized. It is as the moment a proof of concept inspired by MongoShake.
The objective I have here is to implement a lightweight and fail-safe replication mechanism between differents datacenters and remove the requirements from native MongoDB replication to have all the nodes to know each other.
MongoDB comes with a great native replication mechanism inside a ReplicaSet. It is possible to deploy a ReplicaSet on multiple regions/datacenters with excellent replication delay and network fault tolerance. But this topology also comes with a constraint I need to get ride off. This constraint implies that all your nodes are always visible nonetheless between them, but also from the clients that connect to MongoDB. See server discovery and monitoring for more details.
To solve this, the idea to deploy different ReplicaSet on datacenters/regions and keep them synchronized using
mongo-repl. The way mongo-repl can read the source cluster is not covered here. However in my use-case, there is a point-to-point tunnel using tailscale. All MongoDB nodes are on a private subnet.

/status liveness endpoint/metrics endpointmake build
The tool fetch its configuration from a local yaml file. A sample if provided
in the /conf directory. The env variable CONFIG_FILE_PATH is used to pass the
path to the configuration file at start. See config.
cd cmd/repl
go run -c ../../conf/
docker run -it --rm \
-p 3000:3000 \
--mount type=bind,source=/path/to/config.yaml,target=/app/conf.yaml,readonly \
--env-file /path/to/.env \
sebastienferry/mongo-repl:v0.0.8
This project is not yet open to contributions. This might change in the future once the very basic features would have been implemented.
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.