Skip to content

Instantly share code, notes, and snippets.

@pauldardeau
Created January 13, 2016 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pauldardeau/0f312cb03abda770702f to your computer and use it in GitHub Desktop.
Save pauldardeau/0f312cb03abda770702f to your computer and use it in GitHub Desktop.
Swift handoffs
QUESTION
========
how is a handoff partition flagged versus a partition that is marked to be moved during a rebalance?
ANSWER (notmyname)
======
"handoff" is only a thing defined by the results of the call to get_more_nodes(). it's not a concept that means anything with regards to rebalancing. ie it's not "flagged" or anything. handoffs are just an ordered walk through the ring
QUESTION
========
how should one think of handoff devices?
ANSWER (mattoliverau)
======
A hand off device is a non primary node for a certain partition in the ring. Things are placed to hand off nodes when either 1. there wasn't enough primary nodes to keep it durable 2. when write affinity has been set and you want to get your object durability written to a closer region or zone and 3. on a ring rebalance
When looking for an object (GET) swift will check all primary nodes for the object and then some of the hand off nodes.
but in essence once on a handoff node, we have durability which is the most important. but if the primaries are busy or down you may not get your object back until swift corrects it self
the replicators will look at the objects they have, and if its a partition they're a hand off for, becuase they received it cause other primaries where down, or a rebalance suddenly has now suddenly made them a handoff node for a partition, they will replicate it out to the primary nodes and then if successful, delete it.
handoff nodes + eventual consistancy helps swift keep its awesome durability
QUESTION
========
is it (handoff node) meant to be a temporary holding place?
ANSWER (mattoliverau)
======
yeah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment