From owner-freebsd-questions@freebsd.org Wed Sep 7 16:25:25 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F1EBBCB55A for ; Wed, 7 Sep 2016 16:25:25 +0000 (UTC) (envelope-from amitabhkant@gmail.com) Received: from mail-oi0-x236.google.com (mail-oi0-x236.google.com [IPv6:2607:f8b0:4003:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E7479383 for ; Wed, 7 Sep 2016 16:25:24 +0000 (UTC) (envelope-from amitabhkant@gmail.com) Received: by mail-oi0-x236.google.com with SMTP id m11so33409390oif.1 for ; Wed, 07 Sep 2016 09:25:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NJqDeFrHdsc2xmEXT/g0/5LBIfY1KuzjX6RwFKezdGU=; b=AfvOP/0bUuK7JN/Lydy6h5I2QDWGKeHks/ibPMWz1QeBVp3l8G/kBuiByaGDPnhQQh YBbM2Bdjy+5TUh/6wAyp/pa08ZEyOJNMKtT3H+uWQcVmjD7jJBu8d/W556QeduJk9qMZ 0SoRUxXcaiWjobJavaOKQorwtQaXNG2ShZTpx/kH+nQQhpZioarXSZ5l2cIlnbWiZuDE e0jDReGXhkMei1Q0jXx6jCZo8LWomcEtT7i6LYgj1WAUe+enUjUNj8qMYz1BMdSYclIz XD+68rz5IcmNCMxG5C7UzOSYvTB7chai6KyLkThqa+vbsBoVRykXS2tTkNX4Yu2EPHWo wXHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NJqDeFrHdsc2xmEXT/g0/5LBIfY1KuzjX6RwFKezdGU=; b=idIkr6mxTrR9aTtwVXR7phsc3SUuHdrpYOmr/ALKVBZYu3GZU27gOr5nKBk/qznJ4j tHmh+R/zzDeofUK266qD1gwwVAY9h76mrU5zoXfDhBHKFM428u7YGr4cLBWC2afciQgS WpZDKccnNZ9FNBAYOqT37hQCekc7pdmFArQko1KZgfhnvpZEo8bK8m9FiORm5xsNE+qT kPi/Vs3OGV3NNz0pu/7lUh1oESkZ5fhdMDkMSVLgZZC4vJ5bYCnhH9x3+3WyTTfsK+d9 SVch8gG1Iz2YwqOQ4dyetG5KNx3kmlj+8+6kTCj9GNUWjzBxuhQiyAF972KN2wI+G/C/ +UAg== X-Gm-Message-State: AE9vXwMcKofihPxQnc4wcY0271DC8pt70v4+kH6kn/j0+mFt/VwrK88N8ZA6NBA+hKbd4CFqgBVjR6RsTK2XWA== X-Received: by 10.157.55.183 with SMTP id x52mr38339421otb.68.1473265524267; Wed, 07 Sep 2016 09:25:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.117.7 with HTTP; Wed, 7 Sep 2016 09:25:03 -0700 (PDT) In-Reply-To: <7420247e8b1cd07eda9540ea28c9d90b@mail.zplay.eu> References: <7420247e8b1cd07eda9540ea28c9d90b@mail.zplay.eu> From: Amitabh Kant Date: Wed, 7 Sep 2016 21:55:03 +0530 Message-ID: Subject: Re: NFS or rsync for sharing files between FreeBSD servers? To: =?UTF-8?Q?Sol=C3=A8ne_Rapenne?= Cc: "freebsd-questions@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2016 16:25:25 -0000 On Wed, Sep 7, 2016 at 9:48 PM, Sol=C3=A8ne Rapenne wrote= : > Le 2016-09-07 18:09, Amitabh Kant a =C3=A9crit : > >> We need to share a number of directories between 3 servers running 9.3 . >> Most of these directories contain php/html/js/images files which do not >> change frequently. >> >> We need to keep the directories in sync on all three servers. Currently, >> we >> run a rsync command every time there is a change in one of the >> files/directories. Sometimes it does happen that we forget to run the >> rsync >> script making one of the servers return old versions. >> >> That is where we are planning to introduce a nfs_server on one of the >> servers, while the other two will be nfs_clients accessing the files >> through a shared directory. I understand that it would present a single >> point of failure, but in terms of disk access speed, will it make a huge >> difference further impacting the web servers running on the nfs_client >> servers ? The servers are connected to each other over gigabit lines, an= d >> the files are themselves not greater than 20-30 kb on an average, with >> some >> of the larger image files somewhere around 4-5 MB. >> >> >> Amitabh >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe >> @freebsd.org" >> > > Hello, > > When does the files changes ? Is it the server changing the files or is i= t > when your team push changes ? If the changes come from your team, just > change your deployment script to push it to the 3 servers. I would > recommend rsync because if it doesn't change a lot with a NFS you will ad= d > a SPOF (single point of failure) and overhead for no benefit. > > Kind regards > As of now, files are only changed when the team pushes the change. But going ahead, we are looking at a scenario where the files auto-generated through script on one server would be required on other servers too. Using rsync while running a web server process doesn't seem ok to me. The other idea is to use the DB server to store the auto-generated files, and fetch on any of the servers are required. While this is a feasible idea technically, this might also bloat the DB. So if NFS overhead is not too huge, I can take a look at it as an option. Amitabh