Jim Goven
2017-May-19 19:26 UTC
[Gluster-users] How do I slow down client reconnect attempts?
Hello, I would like to use glusterfs to replicate a volume between my desktop and my laptop, so that when I am away from home (and likely disconnected), I can still access some project files. The desktop is on most of the time, but the laptop is rarely on. I have successfully set up gluster to accomplish this goal, but I am looking to improve the disconnected behaviour of the desktop. While the laptop is disconnected (ie, most of the time), the desktop continuously re-tries to connect to the laptop, but in doing so it generates too much DNS traffic trying to find the laptop - it looks like there is no retry delay at all. In turn, the gluster client log files grow very fast, the DNS resolver logs also grow fast, and there is a lot of unnecessary network chatter. I would like to add a delay of between subsequent re-attempts to reconnect, but I can't find any such option at http://gluster.readthedocs.io/...Managing%20Volumes The question is: Is there a way to slow down gluster's attempts to reconnect? I looked through the source as well, and I can't find a delay mechanism. Ideally the reconnect attempts would follow an exponential back-off schedule with a configurable maximum delay, but a fixed, configurable delay would work too. In case a developer reads this, I would be inclined in implementing exponential backoff myself, and submitting a patch, but would appreciate a brief advice of where in the codebase this backoff should be inserted. Thank you jg
Amar Tumballi
2017-May-21 03:33 UTC
[Gluster-users] How do I slow down client reconnect attempts?
On Sat, 20 May 2017 at 1:03 AM, Jim Goven <radu.gluster at ohmi.org> wrote:> Hello, > > I would like to use glusterfs to replicate a volume between my desktop > and my laptop, so that when I am away from home (and likely > disconnected), I can still access some project files. The desktop is on > most of the time, but the laptop is rarely on. > > I have successfully set up gluster to accomplish this goal, but I am > looking to improve the disconnected behaviour of the desktop. > > While the laptop is disconnected (ie, most of the time), the desktop > continuously re-tries to connect to the laptop, but in doing so it > generates too much DNS traffic trying to find the laptop - it looks like > there is no retry delay at all. In turn, the gluster client log files > grow very fast, the DNS resolver logs also grow fast, and there is a lot > of unnecessary network chatter. > > I would like to add a delay of between subsequent re-attempts to > reconnect, but I can't find any such option at > http://gluster.readthedocs.io/...Managing%20Volumes > > The question is: Is there a way to slow down gluster's attempts to > reconnect? > > I looked through the source as well, and I can't find a delay mechanism. > > Ideally the reconnect attempts would follow an exponential back-off > schedule with a configurable maximum delay, but a fixed, configurable > delay would work too. > > In case a developer reads this, I would be inclined in implementing > exponential backoff myself, and submitting a patch, but would appreciate > a brief advice of where in the codebase this backoff should be inserted.Thanks for the offer. Check https://github.com/gluster/glusterfs/issues/152 Currently this is fixed number, you can either make it a xlator option or exponential backoff. If you make it as xlator option, this should be in protocol/client codebase, and then handle it in rpc_clnt.c code. Regards, Amar> > Thank you > jg > _______________________________________________ > Gluster-users mailing list > Gluster-users at gluster.org > http://lists.gluster.org/mailman/listinfo/gluster-users >-- Amar Tumballi (amarts) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.gluster.org/pipermail/gluster-users/attachments/20170521/2a880ab2/attachment.html>