{"id":661,"date":"2017-10-20T10:00:53","date_gmt":"2017-10-20T10:00:53","guid":{"rendered":"http:\/\/wiki.thomasandsofia.com\/?p=661"},"modified":"2017-10-20T10:38:29","modified_gmt":"2017-10-20T10:38:29","slug":"dynamodb","status":"publish","type":"post","link":"https:\/\/wiki.thomasandsofia.com\/?p=661","title":{"rendered":"DynamoDB"},"content":{"rendered":"<p><a href=\"https:\/\/www.udemy.com\/aws-certified-solutions-architect-associate\/learn\/v4\/t\/lecture\/2050700?start=0\" target=\"_blank\" rel=\"noopener\">https:\/\/www.udemy.com\/aws-certified-solutions-architect-associate\/learn\/v4\/t\/lecture\/2050700?start=0<\/a><\/p>\n<p>DynamoDB is a fast and flexible NoSQL database service for all appliations that need consistent, single-digit millisecond latency at any scale.\u00a0 It is a fully managed database and supports both document and key-value data models.\u00a0 Its flexible data model and reliable performance make it a great fit for mobile, we, gaming ad-tech, IoT and many other applications.<\/p>\n<ul>\n<li>Stored on SSD storage<\/li>\n<li>Spread Across 3 geographically distinct data centers<\/li>\n<li>Eventual Consistent Reads (Default)\n<ul>\n<li>Consistency across all copies of data is usually reached within a second.\u00a0 Reapeating a read after a short time should return the updated data. (Best Read Performance)<\/li>\n<\/ul>\n<\/li>\n<li>Strongly Consistent Reads\n<ul>\n<li>A strongly consistent read returns a result that reflects all writes that received a successful response prior to the read.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Pricing<\/h2>\n<ul>\n<li>Provisioned through capacity\n<ul>\n<li>Capacity Units = 1 read or write per second.<\/li>\n<li>Write throughput $0.0065 per hour for every 10 units.<\/li>\n<li>Read throughput $0.0065 per hour for every 50 units.<\/li>\n<\/ul>\n<\/li>\n<li>Storage costs of $0.25GB per month.<\/li>\n<li>DynamoDB does provide substantial discounts for &#8220;Reserved Capacity&#8221;, similar to a reserved instance.<\/li>\n<\/ul>\n<h3>Pricing Example<\/h3>\n<p>Let&#8217;s assume that your application needs to perform 1 million writes and 1 million reads per day, while storing 3 GB of data.<\/p>\n<p>First, you need to calculate how many writes and reads per second you need.<\/p>\n<p>1,000,000\/ (24*60*60)=11.6 writes per second.<\/p>\n<ul>\n<li>Write costs = ($0.0065\/10) x 12 (round up) x 24 (hours per day) = $0.1872<\/li>\n<li>Read costs = ($0.0065\/50) x 12 x 24 = $0.0374<\/li>\n<\/ul>\n<p>DynamoDB is cost effective for reads, but expensive to write. If you have a database that relies heavily on Reads, must be very scalable with great performance and does not require any Table Joins (these do not work with NoSQL) then DynamoDB might be a great solution for you.<\/p>\n<h2>Scaling<\/h2>\n<p>When a DynamoDB database is initially configured, you &#8216;guess&#8217; at how many read and write capacity units you require.\u00a0 You can then look under &#8216;Metrics&#8217; to see how many you&#8217;re actually consuming.\u00a0 Scaling (up or down) is performed on the fly by modifying the number of read\/write capacity units and requires NO downtime!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/www.udemy.com\/aws-certified-solutions-architect-associate\/learn\/v4\/t\/lecture\/2050700?start=0 DynamoDB is a fast and flexible NoSQL database service for all appliations that need consistent, single-digit millisecond latency at any scale.\u00a0 It is a fully managed database and supports both document and key-value data models.\u00a0 Its flexible data model and reliable performance make it a great fit for mobile, we, gaming ad-tech, IoT and ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/?p=661\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,20],"tags":[],"class_list":["post-661","post","type-post","status-publish","format-standard","hentry","category-amazon-web-services-aws","category-aws-databases"],"_links":{"self":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/661","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=661"}],"version-history":[{"count":3,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/661\/revisions"}],"predecessor-version":[{"id":664,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/661\/revisions\/664"}],"wp:attachment":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}