PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 9th of December, 2019

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[07:31:26] <ocx32> hello community, i have two servers running mongo, and i would like to create a two way realtime replication between them, for example if an entry is added on server1, db on server2 needs to be updated, and vice versa - what is the best way of doing that on mongo?
[07:36:12] <Kim^J> Replication
[07:37:48] <ocx32> Kim^J does it have any built in one?
[07:37:51] <ocx32> easy to manage?
[07:39:54] <Kim^J> ocx32: https://docs.mongodb.com/manual/replication/
[07:48:03] <ocx32> Kim^J i dont see any 2 way repplication where both servers replicate
[08:10:25] <Kim^J> ocx32: https://www.mongodb.com/blog/post/active-active-application-architectures-with-mongodb
[08:10:55] <Kim^J> Master-master / active-active isn't something you should do though.
[08:10:58] <ocx32> reading that, but it seems not advisable
[08:11:11] <ocx32> so how can i solve my problem?
[08:11:24] <ocx32> i need to get traffic from both servers
[08:12:01] <Kim^J> 1. Don't do it. 2. Don't do it. 3. Using a database that's built around this idea.
[08:12:10] <Kim^J> *Why* do you need this?
[08:13:41] <ocx32> Kim^J load balancing
[08:14:07] <ocx32> instead of sending all requests to master i can send to multiple servers and they all sync up
[08:14:20] <Kim^J> Yeah... Doesn't work that way.
[08:14:36] <Kim^J> You can have read-slaves that load balance read, but writes, no.
[08:14:37] <ocx32> so need to change db?
[08:14:49] <Kim^J> Writes are *hard* to sync
[08:14:49] <ocx32> couchdb uses mongo same architecture?
[08:15:23] <Kim^J> I doubt it.
[08:15:46] <Kim^J> There are always pros/cons of doing it certain ways.
[08:15:52] <Kim^J> Do you know the CAP-theorem?
[08:16:14] <ocx32> no
[08:16:37] <Kim^J> I highly suggest you learn that.
[08:16:55] <Kim^J> It's the essence all databases are designed around.
[08:18:08] <Kim^J> Also, do you even have a case where the performance isn't good enough? (On performant hardware)
[08:57:42] <ocx32> Kim^J regarding replication in mongo, how much time does it take for master to replicate changes to slave? 10sec?
[08:57:51] <ocx32> or is it in realtime?
[09:00:59] <ocx32> Kim^J second question please, if i receive a wRITE request on slave node, is it smart enough to route that write to master node?
[09:08:46] <kali> ocx32: replication delay depends on the load, it may be below the second in many case. you can to monitor it externaly if you need it
[09:09:33] <kali> ocx32: routing writes to the primary (primary/secondary is preffered to master/slave terminology) is the responsibility of the mongodb client
[10:03:45] <ocx32> kali thank you, so there is no smart internal routing from secondary to primary?
[10:03:47] <ocx32> for writes
[10:08:04] <kali> ocx32: nope, it does not work that way, the client will connect first to any node, ask for the cluster topology, connect to the primary, and routes queries to the primary. if you send a write to a secondary, you get an error
[10:08:30] <kali> (and it's not that trivial to achieve :) )
[10:19:16] <ocx32> kali got it now a cluster abstracts the whole thing
[21:55:54] <zelest> Anyone who runs MongoDB in FreeBSD 12.1? It worked fine a few hours ago, now, when I auth, the client segfaults.. https://dpaste.org/EzCq/raw
[22:35:57] <zelest> GothAlice, around perhaps?
[22:36:03] <zelest> I also found https://jira.mongodb.org/browse/SERVER-31550
[22:36:11] <zelest> but in this case, it's the client that crashes, not the server
[22:44:08] <GothAlice> Alas, zelest, beyond macOS pre-built binaries, I don’t BSD. :/
[22:44:51] <zelest> ah, thanks though
[22:45:20] <zelest> this bug really annoys me. we planned releasing this new cluster tomorrow.. been migrating our platform for months.. TODAY it decides to b0rk.. and i can't figure out why
[22:45:34] <zelest> tried restarting the services and such, all without luck