[Gluster-devel] How does Gluster works - Locating files after change sin cluster
Barak Sason Rofman
bsasonro at redhat.com
Wed Sep 4 09:00:43 UTC 2019
I'm about to post several threads with question regarding how Gluster
handles different scenarios.
I'm looking for answers on architecture/design/"the is the idea" level, and
not specifically implementation (however, it would be nice to know where
the relevant code is).
In this thread I want to focus on the "adding servers/bricks" scenario.
>From what I know at this point, every file that's created is given a 32-bit
value based on it's name, and this hashing function is fixed and
independent of any factors.
Next, there is a function (a routing method), located on the client side,
that *is* dependent on outside factors, such as numbers of servers (or
bricks) in the system which determines on which server a particular file is
Let's examine the following case:
Assume (for simplicity's sake) that the hashing function assign values to
file in 1-100 range (instead of 32-bit) and currently there are 4 servers
in the cluster.
In this case, files 1-25 would be located on server 1, 26-50 on server 2
and so on.
Now, if a 5th server is added to the cluster, then the ranges will change:
files 1-20 will be located on server 1, 21-40 on server 2 and so on.
The questions regarding this scenarios are as follows:
1 - Does the servers update the clients that an additional server (or
brick) has been added to the cluster? If not, how does this happen?
2 - Does the server also know which files *should* be located on them? if
so, does the servers create a link file (which specifies the "real"
location of the file) for the files that are supposed to be moved (e.g.
files 21-25) or actually move the data right away? Maybe this works in a
completely different manner?
I have additional questions regarding this, but they are dependent om the
answers to these question.
Thank you all for your help.
*Barak Sason Rofman*
Gluster Storage Development
Red Hat Israel <https://www.redhat.com/>
34 Jerusalem rd. Ra'anana, 43501
bsasonro at redhat.com <adi at redhat.com> T: *+972-9-7692304*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gluster-devel