Databases Reference
In-Depth Information
Count
Service A
Service B
95%
values
Mean
values
Web service
response time
Figure 8.1 Frequency distribution chart showing mean vs. 95th percentile response
times. Notice two web service response distributions for two NoSQL key-value data
stores under load. Service A has a faster mean value response time but much longer
response times at the 95th percentile. Service B has longer mean value response
times but shorter 95% value responses.
goals. After discussing the results with the business unit, the team selects service B,
since they feel it'll have more consistent response time under load.
Now that we've looked at how you predict and measure system availability, let's take
a look at strategies that NoSQL clusters use to increase system availability.
8.3
NoSQL strategies for high availability
In this section, we'll review several strategies NoSQL systems use to create high-
availability services backed by clusters of two or more systems. This discussion will
include the concepts of load balancing, clusters, replication, load and stress testing,
and monitoring.
As we look at each of these components, you'll see how NoSQL systems can be con-
figured to provide maximum availability of the data service. One of the first questions
you might ask is, “What if the NoSQL database crashes?” To get around this problem,
a replica of the database can be created.
8.3.1
Using a load balancer to direct traffic to the least busy node
Websites that aim for high availability use a front-end service called a load balancer . A
diagram of a load balancer is shown in figure 8.2.
In this figure, service requests enter on the left and are sent to a pool of resources
called the load balancer pool . The service requests are sent to a master load balancer
and then forwarded to one of the application servers. Ideally, each application server
has some type of load indication that tells the load balancer how busy it is. The least-
busy application server will then receive the request. Application servers are responsi-
ble for servicing the request and returning the results. Each application server may
request data services from one or many NoSQL servers. The result of these query
requests are returned and the service is fulfilled.
Search WWH ::




Custom Search