This is a simple implementation of a consistent hash ring using a binary search tree from scratch. I did this because it was fun to do.
Blog post (viral on Hacker News): https://akshatm.svbtle.com/consistent-hash-rings-theory-and-implementation
Works on Python 3 and Python 2.7.