Hi Folks, We've been making some additions to the Brooklyn documentation [here]( https://github.com/apache/brooklyn-docs/pull/78) and [here]( https://github.com/apache/brooklyn-docs/pull/79), and as part of it I was attempting to setup an nginx controller to act as a reverse proxy to a HA Brooklyn cluster
The idea is pretty simple: [image: Inline images 1] The nginx serves as a single front-end to the HA cluster and directs all traffic to the Brooklyn master server. The Brooklyn master and slave server share a single shared persisted state (standard HA configuration using S3 or NFS) On the event of a failure of the master node, the slave node would promote itself to master, and the nginx controller would now direct all traffic to the slave server. If the original master were to be restarted, it would restart as a slave and would be available in the event of failure of the new master server Unfortunately, I've been unable to configure nginx to do what we need. I've got as far as [this configuration file]( https://gist.github.com/nakomis/b216e877bcea206a3c5ad782c195df9c), but in this configuration, once it has failed over to the slave, it's not possible to restart the master server as the new slave If I remove the max_fails and backup directives on lines 7 & 8 in the config above, nginx simply performs a round-robin across the two nodes Is there a way to configure nginx to fail over from the master to the slave (or preferably find the new master)? Any help would be appreciated Cheers M -- Martin Harris Lead Software Engineer Cloudsoft Corporation Ltd www.cloudsoftcorp.com
