

Implementing a Social Graph using Redis - abraham
http://blog.meltingice.net/programming/implementing-social-graph-redis/

======
petercooper
_Because Redis requires the entire dataset to reside in memory._

It doesn't:
[http://code.google.com/p/redis/wiki/VirtualMemorySpecificati...](http://code.google.com/p/redis/wiki/VirtualMemorySpecification)
.. Well, in the classical "in memory" sense. Virtual memory is a _sort_ of
memory.. :-)

~~~
jpcx01
In practical terms, under scale, it's pretty much the case. If you don't have
enough memory to have your entire dataset in memory, the performance degrades
to a point where it'll be too slow to do anything, so it might as well not
work at all.

Similar problems with MongoDB. Anytime your indexed data starts hitting disk,
kiss your site goodbye.

Sharding seems like the proper workaround though, so maybe you could take the
same approach of flockdb and shard the redis social graph.

~~~
stephencelis

        the performance degrades to a point where it'll be too 
        slow to do anything
    

Do you have any examples? In my experience, Redis is pretty fast even when it
lives partially in VM.

You can get boxes with a ton of RAM these, days, though, and if you go beyond
it, you can always shard/distribute the database, like you mention.

