Not sure if I saw this post on Instagram’s approach to IDs & sharding back at the time.
We originally used Flickr’s technique that the Instagram post also links to. We eventually scaled it out a bit differently, reserving some of the bits for the shard ID (like Instagram). We also had slightly different requirements (e.g. 64 bits was a hard max, because we had to use the IDs with SphinxSearch).