This paper is based on the non-relational database of load balancing algorithm by introducing the query cost index. The load is more accurate through the analysis of the historical inquires the log to estimate inquires the price, and applied to the decision-making part of the load in the load balancing. At the same time figure out query cost of the current task to find the right to accept the task node, thus the load balancing change from passive to active, effectively shortening the average query response time, and improve the overall performance of the system.