I have 2 databases in my mongo DB namespace, lets name them db1, db2 and db3 which are on the same dbpath. Is it possible to configure mongo db replica set in that way that db3 wont be replicated across secondaries?
If yes, how?
No, to the best of my knowledge this is not possible. A replica set member is identified by a hostname and port, and there are no settings to control which databases are included. See Replica Set Configuration in the MongoDB manual.
You could create a separate MongoDB server instance configured on a different port (and using a different dbpath) to hold the db3 data, although this would obviously complicate your server setup.
MongoDB replication is handled by host and port, which is per-mongod-process.
The way to do this would be to run db3 run in another mongod process, which runs on a different tcp port.