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.
> >
>