# Sync Multiple nginx Configs

**URL:** <https://www.ruby-forum.com/t/sync-multiple-nginx-configs/210089>\
**Category:** NGINX\
**Created:** [July 30, 2011, 7:24am UTC](https://www.ruby-forum.com/t/sync-multiple-nginx-configs/210089 "2011-07-30T07:24:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [July 30, 2011, 7:24am UTC](https://www.ruby-forum.com/t/sync-multiple-nginx-configs/210089/1 "2011-07-30T07:24:35Z")

</div>

This is more of a best practice question. We need to reliably sync our  
nginx config between multiple front end servers. Just curious what  
other do in this regard.

Rsync does what it says on the tin but would prefer something a little  
more real-time. Would also prefer to avoid creating a failure point  
with NFS.

Suggestions welcome!

John

\_\_  
John Macleod  
Alentus UK Limited  
Seymour House  
South Street  
Bromley  
BR1 1RH  
+44 (0)208 315 5800  
+44 (0)208 315 5801 Fax  
+44 (0)208 819 0358 Direct  
[alentus.co.uk](http://alentus.co.uk) | [alentus.com](http://alentus.com)

"Please consider the environment before printing this e-mail

This e-mail (and/or any attachment) contains information, which is  
confidential and intended solely for the attention and use of the named  
addressee(s). If you are not the intended recipient you must not copy,  
distribute or use it for any purpose or disclose the contents to any  
person. If you have received this e-mail in error, please immediately  
notify the sender. The information contained in this e-mail (and any  
attachments) is supplied in good faith, but the sender shall not be  
under any liability in damages or otherwise for any reliance that may be  
placed upon it by the recipient, nor does it constitute a contract in  
any way. Any comments or opinions expressed are those of the originator  
not of Alentus Corporation unless otherwise expressly stated."

---

<div class="post-metadata">

**Author:** ![John\_Macleod](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@John\_Macleod](https://www.ruby-forum.com/u/John_Macleod)\
**Post date:** [July 30, 2011, 11:00am UTC](https://www.ruby-forum.com/t/sync-multiple-nginx-configs/210089/2 "2011-07-30T11:00:26Z")

</div>

I personally use rsync for this purpose.

---

<div class="post-metadata">

**Author:** ![John\_Macleod](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@John\_Macleod](https://www.ruby-forum.com/u/John_Macleod)\
**Post date:** [July 30, 2011, 11:37am UTC](https://www.ruby-forum.com/t/sync-multiple-nginx-configs/210089/3 "2011-07-30T11:37:28Z")

</div>

> This is more of a best practice question. We need to reliably sync our nginx  
> config between multiple front end servers. Just curious what other do in this  
> regard.
> 
> Rsync does what it says on the tin but would prefer something a little more  
> real-time. Would also prefer to avoid creating a failure point with NFS.

Take a look at GlusterFS. You can use it like RAID1 across multiple  
hosts.

---

<div class="post-metadata">

**Author:** ![John\_Macleod](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@John\_Macleod](https://www.ruby-forum.com/u/John_Macleod)\
**Post date:** [July 30, 2011, 11:43am UTC](https://www.ruby-forum.com/t/sync-multiple-nginx-configs/210089/4 "2011-07-30T11:43:02Z")

</div>

On 07/29/2011 09:15 PM, John Macleod wrote:

> This is more of a best practice question. We need to reliably sync our nginx  
> config between multiple front end servers. Just curious what other do in this  
> regard.
> 
> Rsync does what it says on the tin but would prefer something a little more  
> real-time. Would also prefer to avoid creating a failure point with NFS.
> 
> Suggestions welcome!

Hi John.

If you want something real-time, maybe check ‘lsyncd’. Also there is  
‘unison’, after you change your config, sync it with all boxes. Highly  
depends on use case and what you exact want to do.

– Piotr.

---

<div class="post-metadata">

**Author:** ![John\_Macleod](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@John\_Macleod](https://www.ruby-forum.com/u/John_Macleod)\
**Post date:** [July 30, 2011, 9:01pm UTC](https://www.ruby-forum.com/t/sync-multiple-nginx-configs/210089/5 "2011-07-30T21:01:11Z")

</div>

config over a git repo and a cron every N minutes 🙂

---

<div class="post-metadata">

**Author:** ![John\_Macleod](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@John\_Macleod](https://www.ruby-forum.com/u/John_Macleod)\
**Post date:** [July 30, 2011, 4:39pm UTC](https://www.ruby-forum.com/t/sync-multiple-nginx-configs/210089/6 "2011-07-30T16:39:58Z")

</div>

Hi

On Sat, Jul 30, 2011 at 5:38 PM, Piotr K.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> > Suggestions welcome!
> 
> Hi John.
> 
> If you want something real-time, maybe check ‘lsyncd’. Also there is  
> ‘unison’, after you change your config, sync it with all boxes. Highly  
> depends on use case and what you exact want to do.

lsyncd = inotify + rsync, not true real time.

Iyou could test DRBD

> **[Downloads](https://linbit.com/downloads/)**
>
> LINBIT software download page for LINSTOR, LINSTOR Connectors, DRBD Linux Kernel Driver, DRBD Windows Driver and utilities

– Piotr.

---

<div class="post-metadata">

**Author:** ![John\_Macleod](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@John\_Macleod](https://www.ruby-forum.com/u/John_Macleod)\
**Post date:** [August 1, 2011, 5:47pm UTC](https://www.ruby-forum.com/t/sync-multiple-nginx-configs/210089/7 "2011-08-01T17:47:32Z")

</div>

On 8/1/11 8:21 AM, “Flavio Torres” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Or try [http://www.puppetlabs.com/](http://www.puppetlabs.com/) and sync all your datacenter confs 🙂

Or chef 😉  
[http://wiki.opscode.com/display/chef/Home](http://wiki.opscode.com/display/chef/Home)

–  
Brian A.

---

<div class="post-metadata">

**Author:** ![John\_Macleod](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@John\_Macleod](https://www.ruby-forum.com/u/John_Macleod)\
**Post date:** [August 1, 2011, 2:22pm UTC](https://www.ruby-forum.com/t/sync-multiple-nginx-configs/210089/8 "2011-08-01T14:22:59Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

On 07/30/2011 03:58 PM, Martin Loy wrote:

> config over a git repo and a cron every N minutes 🙂

Or try [http://www.puppetlabs.com/](http://www.puppetlabs.com/) and sync all your datacenter confs 🙂

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.11 (GNU/Linux)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org/](http://enigmail.mozdev.org/)

iEYEARECAAYFAk42mjsACgkQNRQApncg294nlgCffIx7NSYgkrCao0zZtN1iOa0r  
bYoAoIy7IHqMlFUkP8GAzSm+WnZHSx1Z  
=IXqJ  
-----END PGP SIGNATURE-----
