Advanced Configuration - BangDB Server


Following are some of the configuration parameters for BangDB Server which might be helpful in tuning the server further. For advanced BangDB engine configurations, please see the details here BangDB Engine advanced configuration

The server comes with default values set and for test and development puposes these values should be good enough. But for the server in production we may need to worry about few variables and set them properly. Note that the configuration file provides hints by putting '*' before the variable. More stars for a variable would mean that this is something that user should look at changing and less stars means be doubly sure before making changes

Advanced Configurations


Set this to higher lower values based on the anticipation of number of concurrent clients. Note that server handles large concurrent connections well with low resource overhead, however, when in crunch setting lower value might help. On the other hand if large concurrent connections are anticipated setting the higher value would be good


This represents the typical queue size for listne. Similar explanation as above


This is to tell the cluster and master the maximum number of slaves that can coexist. This doesn't have any overhead on the server at the start but too many slaves could hurt performance and hence it is good to put a decent size for this value which acts as run time check and verification


This acts as buffer for data to be replicated while sync is in progress when slaves are attached to ensure that master and cluster keep on serving data at all time. When db has huge volume of data to be synced and to few other data centers as well then larger value for this parameter is required especially when too many operations are expected. Note that in typical scenario, few hundred MB for this values should be good enough but when in doubt increase the value.


Default value for this is 10sec and can be changed to other values (in seconds) as required. Please note that decreasing the value (or increasing the frquency) would cause more chatter which may hurt performance and too high a value would risk dead slaves/master too late therefore denying the service


How many failures (continuous) should be seen before a node is declared to be dead or unavilable? This value is precisely for this. A decent value would help optimize the context


This is the typical time out value for client connections. If client is inactive for a period equal or more than this then server would time them out. Note that this value is not applied in exact manner, typically the actual timeouts happen after elapse of little more than the defined value and the 'little more' is undefined, it could be few milli seconds or more


BangDB Server is staged event driven system and we can configure number of stages in the system programatically in different permutations and combinations. Two such ways are implemented and provided as built in. One can use the configuration parameter to select the required one. Default one uses two stages and other option enables four stages. Default works in most of the cases however in case when event handling takes more time then it will be worthwhile to check out the four stage option


This sets the number of workers in the ops stage, the stage which actully handles the event (or process the event). Typical number would be close to number of cores in the machine, but user may play with the numbers to set the right one in the given context


For both master and slave we use same config file, we just change some variable's values. For master set the value as 0 and for slave set it as 1


Default is 1(ON), recommended as well. But in many use cases replication may not be required and in those cases shutting off replication would reduce resource consumption and also improve performance in the case