Skip to content

create_close accept multiple paths for durability improvement#39

Open
hrchu wants to merge 1 commit intomogilefs:masterfrom
hrchu:multiWrite
Open

create_close accept multiple paths for durability improvement#39
hrchu wants to merge 1 commit intomogilefs:masterfrom
hrchu:multiWrite

Conversation

@hrchu
Copy link

@hrchu hrchu commented Aug 7, 2016

Add new optional create_close request arguments, i.e., devid_X, path_X and dev_count, so that tracker can confirm that enough copies of file are written before ack succession.

This way prevents the file loss risk that the host/disk which hold the first copy may broken before replication is done.

Add new optional create_close request arguments, i.e., devid_X, path_X and dev_count,
so that tracker can confirm that enough copies of file are written before ack succession.
This way prevents the file loss risk that the host/disk which hold the first copy may broken before replication is done.
@hrchu
Copy link
Author

hrchu commented Aug 7, 2016

Motivation

Current serving file procedure just writes a copy, and do replication to fit the class setting later. Since the host/disk which hold the first copy may broken before replication is done, this strategy actually trades durability for performance. (It was indeed happened in my production environment, and the issue may observable if the environment has enough capacity of write operations and disks.) Although it's a reasonable design in ten years ago.

Since the high performance hardware is available today, the design of almost all of morden DFSs such as openstack swift, ceph, glusterfs, microsoft azure storage, linkedin's Ambry, Dropbox's magic pocket...et al., pays more attention to durability. These DFSs will try to write enough copies of file before ack the serving file procedure.

It will be cool to let mogilefs make use of modern hardware, and has the same ability of durability as other modern DFSs.

Proposal

This PR wants to give the choices to user. User who focus on durability can have the same level of durability as other modern DFSs, and still keeping mogilefs's simple and easy to use. User who focus on performance can still use mogielfs as before.

The PR is simple, it just adds new create_close request arguments, i.e., devid_X, path_X and dev_count, so now create_close can accept multiple paths and devids.
Full serving file procedure will like this:

  1. client send create_open to tracker
    create_open domain=toast&class=triple&multi_dest=1&key=mozo3
    OK dev_count=3&path_1=http://127.0.15.10:7500/dev7/0/000/000/0000000027.fid&devid_1=7&devid_3=1&fid=27&devid_2=3&path_2=http://127.0.0.25:7500/dev3/0/000/000/0000000027.fid&path_3=http://127.0.0.20:7500/dev1/0/000/000/0000000027.fid
  2. client put files to multiple stores
  3. clinet send create_close which contains multiple paths and devids to tracker
    create_close domain=toast&fid=27&devid_1=7&path_1=http://127.0.15.10:7500/dev7/0/000/000/0000000027.fid&size=1048576&key=mozo3&devid_2=3&path_2=http://127.0.0.25:7500/dev3/0/000/000/0000000027.fid&dev_count=2
  4. tracker valid files stored in two above paths then ack succession.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant