Hundred’s of millions of packages in one day – one chimney at a time.
It’s that time of the year, where our minds are shifting to thoughts of stuffed turkey, eggnog and, if you’re anything like me, dreading the thought of making sure you’ve ticked off your holiday shopping list. Sure, I could have started earlier.
But, what if your list didn’t just extend to Uncle Earl and that third cousin he always brings around at the holidays. Now imagine your list had 2 billion entries, and you somehow needed to deliver all the gifts, on the same night, all around the world. And worse still, what if you didn’t really know where you were delivering which gifts because your recipients were moving all the time. Oh, and they’re physically standing on a planet that itself is moving at 1000 miles an hour. So now not only do you have a super complex version of the traveling salesman, but your list is dynamic and now closer to an organism than a scrappy piece of paper.
Most would agree, that the most natural way to scale, in the same way, that Santa has had to scale over the last century of population growth is to get more Santa’s…but barring the odd day in San Francisco where a mass of Santa’s take to the street, we know there’s only one!
And as Ross Turk explains in his great talk at OSCON 2012 – “The tricks that you use to make something big, aren’t the same tricks that you use to make things infinite – it’s just different.”
But we think we know his secret. It’s also part of the “secret sauce” that powers Ceph. You see, in order to achieve what Santa does, or indeed, a hotel with a billion rooms, if that is more your thing, you need:
- Deterministic Pseudo-Random Repeatable Placement Algorithm
- Intelligent Nodes – in our example, very, very clever reindeer!
In Ceph, this is known as CRUSH, or Controlled Replication Under Shared Hashing, and it is the way that Ceph, figures out how to put data inside its cluster.
So while it’s no longer’s Santa’s list of who’s been nice, but the same problem, if you have an infinitely scalable storage system, with an infinite number of nodes, and you can’t write down where stuff is, you have to calculate where to put it, and where to get it.
Now, I know, I’m eating into valuable gift shopping time, but to further understand how CRUSH works, very briefly – you call CRUSH and pass it a cluster map and a series of placement rules, and it tells you – here’s your data, it’s in this node. When you then come to wanting to put data into the cluster, it tells you where to put it. Importantly, the nodes are intelligent, so as the cluster changes, it moves the data accordingly. So when the next round of calculations is made, the data is exactly where it is expected to be.
Phew. Ok. Sound complicated? It is. You can learn more about Ceph here. To learn more about what we’re doing at SoftIron to make Ceph easier to use, head on over to softiron.com
Now, it’s time for some eggnog and to close by saying – we’re not here to dispell any myths, we’re just saying, what Santa pulls off in one night is really something!
Thanks to Ross Turk for the inspiration behind this piece and all the great work he’s done for Ceph!