Aerospike bins count limitation - removing a bin name


Hi, Aerospike doc says that total number of bins are limited to 32k. The quastion is: is this limit for the different (unique) bin names, or for the total count of bins? This is principal question for a project design.

I wrote the test, and I can put into test namespace 100 000 records with one bin (all with the same name). in aql ‘show bins’ lists only 1 bin. This seems that we can have infinite number of bins with the same name. When I try to put 100 000 records with the different bin names then I’ve got an error: AerospikeException: Error Code 21: Bin name length greater than 14 characters, when number of records reach about 32500. Strange error as my bin’s names are not more then 14 characters.

There are 3 nodes in the cluster.


That is correct, we support a maximum of 32K unique bin names within a particular namespace. You can have an unlimited number of records (keys), and you can have a variety of bins, but no more than 32k.

The limitation is based on our internal string pool, and thus saves a lot of memory for RAM namespaces, instead of having the replicated string over and over. We are considering raising the limit a bit. What limit do you think is reasonable for the designs you are considering?


Is that 32K limit the number of bins at any one time, or the number of bins across the lifetime of the set? Or to put it another way, if one were to use customer_name as a bin name, would they be limited to 32K customers at any one time, or 32K customers ever?


Neither, if the only bin name is customer_name, regardless of how many records with unique values for this bin you have, you will only use 1 bin name out of the 32k unique bin name limit.


Sorry, I guess my question was unclear: if the bin name is “customer1”, “customer2”, etc, then am I limited to 32K customer-named bins over the lifetime of the database or just at any one time?


Oh thanks for the clarification. Yes, in the case that the bin name is the unique customer name, then you would be limited to 32k customers in that namespace, over the lifetime of the namespace. The table that stores the bin name grows monotonically but is rebuilt on a cold restart (maybe fast restart too). So if it were ever the case that you were sure a number of bin names no longer existed you would need to restart each node to remove those entries. See this kb post for more information about removing a bin name.


I am also facing the same problem in which the bin count has exceeded the allocated limit in namespace. While trying to get bin list i am unable to understand the show bin result. what does the column “quota” and “count” signify there ?


‘Quota’ is the upper limit that you have which is 32k and ‘count’ is the total number of bins that you have currently for the specified namespace. What ‘count’ values are you seeing on your output?