News for hackers. Stuff that matters.
Re:The genius and folly of MongoDB by ak217 on Sunday October 20, 2013 @03:48PM (#6581208)
I'm curious, how do other DBMSs handle a master switch/other cluster updates? I'm familiar enough with mongos to know how it works but not what e.g. redis or postgres or mysql does.
Re:The genius and folly of MongoDB by gaius on Sunday October 20, 2013 @05:48PM (#6581662)
Oracle restarts your query, where it was interrupted, on another node. The feature is called TAF, transparent application failover. A client might notice a brief pause, but probably not even that.
Re:The genius and folly of MongoDB by pkolaczk on Monday October 21, 2013 @07:19AM (#6584694)
The best is not to ever need it by using an architecture with no SPOF (even temporary). Master switch is a huge pain - there are simply too many nasty ways it can fail miserably. I'd stay away from databases needing it, if high availability is the primary concern.
Re:The genius and folly of MongoDB by ak217 on Tuesday October 22, 2013 @12:39PM (#6593076)
OK, but that's a serious performance and functionality tradeoff.

Most modern architectures make the choice between having nodes serve as master for a subset of the data, and the increased cross-link bandwidth needs and reduced flexibility of a master-less system.

Re:The genius and folly of MongoDB by rsynnott on Sunday October 20, 2013 @07:26PM (#6582053)
Most master-slave databases don't do auto-promotion themselves; it's a bit of a minefield. (In particular, in cases of network partition, where some applications servers may have a different view to others on whether the master is dead or not).
Re:The genius and folly of MongoDB by ak217 on Sunday October 20, 2013 @11:50PM (#6583218)
OK, but that's a different concern. If a database admin manually switches a master (called a primary in Mongo), then someone is responsible for deciding what to do with queries that are in flight. In Mongo, the driver drops them, which is less than optimal. It certainly is a hard problem for writes, but not so for reads.

To your point, I think deployments on modern architectures generally want the ability to scale out and tolerate network partitions, which makes the ability to drop and re-elect masters, reconcile a node that rejoins after a partition, manage shards, avoid hosing remaining nodes, etc. critical. Inability to do so really hurts on a platform like AWS (or in any multi-datacenter deployment, really).

Re:The genius and folly of MongoDB by invisible on Monday October 21, 2013 @12:22PM (#6586516)
I think dropping reads is just as unsettling as dropping writes in production.

Also, MongoDB does let you elect a primary via setting a priority. Really, it should be a requirement because sometimes mongo nodes will switch due to a dropped packet (or this is all I can assume at least) and the arbiter just randomly picks a node when there aren't priorities.