Limit to the number of links an object can have?

Magnus Enarsson magnus at
Tue Mar 23 12:04:48 EDT 2010


Besides the scaling and availability I find the linkage feature of
Riak to be one of the most exciting ones. To me it is a really killer
feature as it makes it possible to model relations, and fetch objects
based on those relations in one single query!

However, the number of links an object can have seems to be somewhat
limited, and that make the feature much less usefull:

At I read
"In a pinch, this can substitute as a lightweight graph database, as
long as the number of links is kept reasonably low; think dozens, not

On the other hand, at I read
"There is no artificial limit to the number of links an object can
have. But, as adding links to an object does increase that object's
size, the same guidelines that apply to your data should also apply to
your links: strike a balance between size and usability."

When I try to create an object with many links using Ripple Ruby gem,
I get a 400 error after adding a little more than 70-250 links
depending on key sizes. The limit seems to be when the Link header go
beyond 8200 or so characters.

I understand that many links will make it more expensive to handle the
object, but it is still better to follow many links from one object to
another than to have to do a full bucket scan with map/reduce. I would
not expect a tight limit on links on a Big Data database like Riak.

So what are really the limits with the number of links you can have
for one object? Are the limits that I encounter related to Ripple
rather than Riak? How can I go around this limit?

Kind regards,

More information about the riak-users mailing list