By the way, I didn't mean to be dismissive of the desire for a master-slave setup - if someone wants to do that with Couch, or they have a good reason to need it, good luck to them. But the mechanism you used to create this limitation - whether it be nginx redirects, putting the master at a different subdomain or path, having different user access control on the master and the slaves, etc. - depends upon the actual reasons for wanting a master-slave setup. The only reason I can really think of is if you want absolute consistency rather than eventual consistency - which you can't guarantee anyway because of the way MVCC works even on a single Couch instance.
On Fri, Jan 13, 2012 at 7:32 AM, Hendrik Jan van Meerveld <[email protected]>wrote: > Can you setup Nginx to not accept PUT request on the slaves? > > Something like this: > > #replication requests will stop here > location ^~/_replicate { > proxy_pass http://localhost:5984; > proxy_redirect off; > proxy_set_header Host $host; > proxy_set_header X-Real-IP $remote_addr; > proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; > } > > #for everything not-replication do not allow PUT requests > if ($request_method !~ ^(GET|HEAD)$) { > return 444; > } > > Regards, > H > > > > On 12 January 2012 17:59, Mark Hahn <[email protected]> wrote: > > > There is nothing in the meaning of "master" that implies rolling the > master > > function to another server. Doing so will require extra development > > effort. Using couchdb as masterless saves you from having to do that. > > > > On Thu, Jan 12, 2012 at 8:46 AM, Robert Newson <[email protected]> > wrote: > > > > > Erm, unless you are speaking another language where 'single point of > > > failure' is a semantically correct sentence that coincides with the > > > English one I'm familiar with, the point of having a slave is so you > > > can fail over to it if the master fails, thereby removing the 'single > > > point of failure' (Traditional Definition) of the master. > > > > > > /sarcasm > > > > > > B. :) > > > > > > On 12 January 2012 16:40, Mark Hahn <[email protected]> wrote: > > > >> Master/Slave is a fine setup, why not? :) > > > > > > > > Single point of failure. > > > > > >
