couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hendrik Jan van Meerveld <haa...@gmail.com>
Subject Re: How to setup an master - slave enviroment
Date Thu, 12 Jan 2012 20:32:30 GMT
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 <mark@hahnca.com> 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 <rnewson@apache.org> 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 <mark@hahnca.com> wrote:
> > >>  Master/Slave is a fine setup, why not? :)
> > >
> > > Single point of failure.
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message