Have you ever wondered what is going on with those new Shard databases in Sitecore 9? This is the new xDB! The new Shard Manager stores data based on the contact ID. A contact ID is a GUID identifier that is unique for each contact. It looks something like this:
The xDB scales out by splitting these contacts across the various shards based on their contact identifier. A 16-byte hash of the GUID is used and assigned to each shard to ensure distribution.