Ask Your Question
2

How to minimize the chance that a file can't be read during Swift rebalance process?

asked 2014-03-04 13:38:33 -0500

anonymous user

Anonymous

updated 2014-03-07 15:12:43 -0500

smaffulli gravatar image

hi

After I make changes to the object.builder file and rebalance it

swift-ring-builder object.builder rebalance,

I got a new version of object.ring.gz. I copy this file to all proxy and storage nodes. The new one got uploaded into memory, replicator starts to do its job moving data around.

My question is when I try to download files, will there be chances that a file has not been moved to a new partition according to the new ring file from the old partition according to the old ring file, which results in file not found problem?

During the data rebalance process with the new ring file, if a GET could not find the file from its primary node, then it will try its first replica node (as determined by the new ring), if still not find it, then try the second replica. If still not found, because data have not been moved yet, then the GET will return data not found. Is my understanding right? Could me minimize the chance that a file can't be read during rebalance process?

regards

Henry

edit retag flag offensive close merge delete

Comments

you have determined that the process is complete rebalance?

ddenia ( 2015-04-21 05:30:06 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-03-07 17:00:48 -0500

torgomatic gravatar image

That's really close, but not quite there.

Each object has three primary nodes with copies of your data on them. For a GET request, the proxy tries all three, and then tries the first three handoffs. During a rebalance, swift-ring-builder reassigns at most one of the primary nodes, leaving at least two replicas unchanged and hence available. The other nodes won't get moved until at least min_part_hours hours have passed, so as long as min_part_hours is big enough, your data will always be available even after a rebalance

Note: with N replicas, it'll only move 1 and keep N-1 in place, so if you're only running with 1 replica, you will suffer unavailability after a rebalance.

edit flag offensive delete link more

Comments

So, I understand that when doing a rebalance, only one of the three replicas is moved. The rebalance process never moves 2 replicas ?

AminaM ( 2015-03-23 14:35:35 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Get to know Ask OpenStack

Resources for moderators

Stats

Asked: 2014-03-04 13:38:33 -0500

Seen: 153 times

Last updated: Mar 07 '14