FetLife says "Goodbye Cassandra" for a 15% speed boost and better reliability
---
Goodbye Cassandra by JamesLennon about 1 month ago
I just finished turning the lights out on our cassandra cluster. For the past 2 weeks, I've been slowly rolling out the new technology that has now fully replaced cassandra. The result, so far, has been a faster and more stable FetLife.
FetLife is around 15% faster overall. Our average latency has dropped from around 150 milliseconds to around 130.
The home page is just under 50% faster, having dropped from 350ms to 190ms. And the time it takes to retrieve one page of the activity feed has seen the most impressive (mean) speedup, going from 125ms to 25ms.
The code that now powers the activity feed is extremely simple. We store each of the "stories" (the updates that you see in your feed) in a MySQL database with a big cache in front of it. The timelines are stored in redis, which is really just linked lists, hash tables, and sorted sets exposed as a network service. It's all really simple and pretty easy to debug when stuff goes wrong.
We've also put a lot of extra effort in to fault tolerance and availability. The new services gracefully recover from intermittent failures. Since we switched the new code live, there have been a number of these kinds of errors, but not one has been seen by a user. In other words, shit is working.
As with any project like this, only time can tell us how successful it is. But, so far things appear healthy, and we'll be watching very carefully in the coming weeks and months.
If you have any questions, leave a comment or feel free to contact me directly."
---
(The original post is a month old, but the only post about FL on HN was in a "Who's hiring" thread.)