The system not only manages reasonably the Insert/Update/Delete requests, it also optimizes the performance of the SELECT queries. The algorithm for balancing the search requests guarantees minimum total load of the servers with databases. The idea is simple: a certain “rate” is calculated for each database. The rate is a coefficient (positive integer), which determines the relative power of the server which contains your database. A higher rate means that your server is more powerful than the others. A smaller coefficient means that your database has limited resources and cannot process a big number of requests in real time.
After the rates of your databases are configured, you have to configure each of your requests. The program interface (API) allows you to set a coefficient – rate for each of your SELECT/FIND requests. The rate is a real positive number between 0.0 and 1.0. The rate of the request is set by the developer and is presented as a parameter during execution. The coefficient of the higher load requests is closer to 1.0, and the coefficient of the lighter load requests is closer to 0.0.
Based on the set coefficient and the configured rates of the databases the system automatically chooses the most suitable server to process the given request. In that way the heavier requests are processed on the more powerful servers, and the lighter – on the less powerful. BUT for the algorithm to work, administrators and developers must properly align the rates of each database and the coefficients of the requests. We cannot guarantee that the algorithm will work properly if these values are not configured correctly.