<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 02/03/2016 08:03 PM, Peter Spain
wrote:<br>
</div>
<blockquote
cite="mid:CAJymbfpBGR9rf0wmEgFBH=g9BaASvhmuNWYpg3Pw+k60rb0vEw@mail.gmail.com"
type="cite">
<div dir="ltr">Hello
<div><br>
</div>
<div>I am very new to GlusterFS and have been playing around
with over the last few weeks, with a view to using it in
production. So far I found Gluster to be very interesting and
easy to get along with. However, there seems to be a giant
hole where the Gluster Native Client documentation should
live.</div>
<div><br>
</div>
<div>After using it for a few weeks and playing around (inside
various VMs) I am still not entirely sure how the client
behaves.</div>
<div><br>
</div>
<div>From network captures it is clear that the client
communicates to all the nodes for a particular volume, and
that the client gets this information from a volfile (which it
retrieves when mounting a volume). Various blog posts confirm
this and go on to mention that the client is responsible for
replicating data across nodes, and not the nodes themselves. I
assume this is still the case?</div>
</div>
</blockquote>
That is correct. The client volfile dictates what translators are
loaded on the client process. You can look at the various volfiles
in /var/lib/glusterd/vols/<volname> on the server to get an
idea of what xlators are loaded for different processes and how they
are stacked to form a graph. The graph is also printed in the log
files of each process as it starts. Each xlator does a specific
function. The replication xlator (AFR) is a client xlator that is
loaded (among others) on the client graph in case of replicated
volumes and has the replication logic. <br>
<blockquote
cite="mid:CAJymbfpBGR9rf0wmEgFBH=g9BaASvhmuNWYpg3Pw+k60rb0vEw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Beyond that I really have no idea how the client behaves in
a replicated volume. </div>
</div>
</blockquote>
If you specifically want to know how AFR works, you can see
<a class="moz-txt-link-freetext" href="https://github.com/gluster/glusterfs-specs/blob/master/done/Features/afr-v1.md">https://github.com/gluster/glusterfs-specs/blob/master/done/Features/afr-v1.md</a>.
It is a bit dated but the most of it is still valid.<br>
<br>
<blockquote
cite="mid:CAJymbfpBGR9rf0wmEgFBH=g9BaASvhmuNWYpg3Pw+k60rb0vEw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>My questions are:</div>
<div><br>
</div>
<div>There is a "ping-timeout" option to adjust how long it
takes the client to connect to a different node, in case of
node failure. </div>
</div>
</blockquote>
Actually, it is the time duration for which the client waits to
check if the server is responsive. (see `gluster volume help`), even
after connection is established.<br>
<blockquote
cite="mid:CAJymbfpBGR9rf0wmEgFBH=g9BaASvhmuNWYpg3Pw+k60rb0vEw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>If the client knows about all nodes and actively
communicates with all of them, why does it need a time out at
all? <br>
</div>
</div>
</blockquote>
You would need some sort of a heartbeat for the clients to know that
its connection to servers are still intact or lost because a brick
went down or there was a network disconnect etc.<br>
<blockquote
cite="mid:CAJymbfpBGR9rf0wmEgFBH=g9BaASvhmuNWYpg3Pw+k60rb0vEw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Why does the client "stick" to a particular node? <br>
</div>
</div>
</blockquote>
Not sure what you mean. The client process connects to all the
bricks of the volume. Open one of the client volfiles (or the
logfile) and study the graph, you'll see many 'protocol/client'
xlators, one for each brick that the client needs to talk to.<br>
<blockquote
cite="mid:CAJymbfpBGR9rf0wmEgFBH=g9BaASvhmuNWYpg3Pw+k60rb0vEw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Does the client go back to the original node once it
recovers?</div>
<div><br>
</div>
<div>Is it possible to dictate which node a client will
initially connect to on mounting a volume?</div>
</div>
</blockquote>
Like I said, the client connects to all bricks of the volume.<br>
<blockquote
cite="mid:CAJymbfpBGR9rf0wmEgFBH=g9BaASvhmuNWYpg3Pw+k60rb0vEw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>If all this information is contained in some documentation
I would love to be pointed to it, as so far I cannot find the
answer to these questions.</div>
</div>
</blockquote>
There are many presentations you can find online on glusterfs
architecture. <a class="moz-txt-link-freetext" href="https://gluster.readthedocs.org/en/latest/">https://gluster.readthedocs.org/en/latest/</a> is another
good start.<br>
<br>
Hope that helps,<br>
Ravi<br>
<blockquote
cite="mid:CAJymbfpBGR9rf0wmEgFBH=g9BaASvhmuNWYpg3Pw+k60rb0vEw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Regards</div>
<div><br>
</div>
<div>Peter</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Gluster-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a>
<a class="moz-txt-link-freetext" href="http://www.gluster.org/mailman/listinfo/gluster-users">http://www.gluster.org/mailman/listinfo/gluster-users</a></pre>
</blockquote>
<br>
<br>
</body>
</html>