Databases Reference
In-Depth Information
Figure 8.4 Amazon DynamoDB table throughput provisioning. By changing the number of
read capacity units or write capacity units, you can tune each table in your database to use
the correct number of servers based on your capacity needs. Amazon also provides tools
to help you calculate the number of units your application will need.
Amazon implements the DynamoDB service using complex algorithms to evenly dis-
tribute reliable read and write transactions over tens of thousands of servers.
DynamoDB is also unique in that it was one of the first systems to be deployed exclu-
sively on solid state disks ( SSD s). Using SSD s allows DynamoDB to have a predictable
service level.
One of the goals of DynamoDB is to provide consistent single-digit millisecond
read times. The exclusive use of SSD s means that DynamoDB never has to take disk-
access latency into consideration. The net result is your users get consistent responses
to all GET and PUT operations, and web pages built with data on DynamoDB will seem
faster than most disk-based databases.
The DynamoDB API gives you fine-grained control of read consistency. A devel-
oper can choose if they want an immediate read of a value from the local node (called
an eventually consistent read) or a slower but guaranteed consistent read of an item. The
guaranteed consistent read will take a bit longer to make sure that the node you're
reading from has the latest copy of your item. If your application knows that the values
haven't changed, the immediate read will be faster.
This fine-grained control of how you read data is an excellent example of how you
can use your knowledge of consistency (covered in chapter 2) to fine-tune your appli-
cation. It's important to note that you can always force your reads to be consistent, but
it would be challenging to configure SQL -backed data services to integrate this fea-
ture. SQL has no option to “make consistent before select” when working with distrib-
uted systems.
DynamoDB is ideal for organizations that have elastic demand. The notion of pay-
ing for what you use is a primary way to save on hosting expenses. Yet when you do
Search WWH ::




Custom Search