Amazon DynamoDB is a fully managed NoSQL database service provided by AWS that delivers single-digit millisecond performance at any scale. It provides fast and predictable performance with seamless scalability and flexible data modeling. DynamoDB allows users to provision the necessary throughput capacity and pay only for what they use, with no upfront costs and no need to provision, operate, or scale the underlying database infrastructure.
DAT102 Introduction to Amazon DynamoDB - AWS re: Invent 2012
1.
2.
3. Amazon DynamoDB is the result of everything we’ve learned from
building large-scale, non-relational databases for Amazon.com and
building highly scalable and reliable cloud computing services at AWS.”
4.
5.
6.
7.
8.
9.
10. You Choose: To get the database
• Memory performance you want:
• CPU • Throughput rate
• Hard drive specs • Latency
• Software • …
• …
11. You Choose: To get the database
• Memory performance you want:
• CPU • Throughput rate
• Hard drive specs • Latency
• Software • …
• …
12. Tell us the performance you want
Let us handle the rest
13. Every DynamoDB table has:
• Provisioned write capacity
• Provisioned read capacity
• No limit on storage
18. When you run your own database, you need to:
• Try and forecast the scale you need
• React quickly if you get it wrong
• Invest time and money learning how to scale your
database
19. Benefits:
• Safety; you know you’re ready
Risks:
• Buy too much capacity
• Lose development resources to
scale testing/planning
• Do more work than necessary
20. Benefits
• Lower costs if all goes well
Risks:
• Last-minute scaling emergencies
• How does your database behave at an
unexpected scale?
23. Capacity we needed before DynamoDB
Capacity we can provision
with DynamoDB
Actual traffic
24.
25.
26.
27. One simple command to move your data from Amazon DynamoDB into
Amazon Redshift:
copy redshift_table from 'dynamodb://dynamo_table‘ credentials
'aws_access_key_id=****;aws_secret_access_key=****';
30. Nexmo API connects Apps with Our clients use Nexmo API in many
any phone in the world different ways
Nexmo API connects : • Two factor
Developers
authentications
• two-way, inbound via long
OTT &
• P2P
number (16 countries) communication
• from the cloud via a direct to
carrier model
• to over 1000 mobile networks. Text based
Entreprise
communications
between tenant
and owners using
long numbers.
Send high
Resellers
volumes of SMS
to Nexmo direct
links
31. • 1 billion records in the last 6 months
• 5+ millions new records per day
• Help Desk: Most common question “What’s the
status of my message?”
• Requirements:
– Make all messages searchable in near real time
– Search response time agnostic of volume
– Search by
• Message ID
• Account ID, Recipient Number and Date
33. • Message includes:
– One record for the submitted message (MT)
– One record for the intermediate delivery receipt (DR)
– One record for the final delivery receipt (FS)
• 5 “tables” (MT,MO,DR,FS,REJ) using 50
domains each to improve writes throughput
• Search by ID: no brainer
34. 50 threads MT
1
searching
Account, …
matching records
Reconstruct
4
DR Message result
2 Search set
matching GW_ID
GW_ID
Search FS
3
matching GW_ID
GW_ID
35. • 5 “tables” (MT,MO,DR,FS,REJ)
• 1 “index”
– Hash: [account id] + “::”+ [phone number]
– Range: date
• Select id from MT where accountId=? And
phoneNumber=? And date=?
Condition rangeKeyCondition = new
Condition().withComparisonOperator(ComparisonOperator.BETWEEN.toString())
.withAttributeValueList(new AttributeValue().withN(d1),
new AttributeValue().withN(d2));
QueryRequest mtRequest = new QueryRequest().withTableName(MT_INDEX)
.withHashKeyValue(new AttributeValue().withS(accountId+"::"+msisdn))
.withRangeKeyCondition(rangeKeyCondition);
QueryResult mtResult = getAWSDynamoDBClient().query(mtRequest);
36. MT
2 Search
matching ID
ID
1 Search Index
matching IDs Reconstruct
INDEX,DATE
5
DR Message result
3 Search set
matching GW_ID
GW_ID
FS
4 Search
matching GW_ID
GW_ID
41. Provider Product Throughput Engineering Cost of
per Instance Cost Ownership
Microsoft SQL Server 2008 Medium Low High
MySQL MySQL Medium High* High*
Earth Networks In Memory Quadtree High High Medium
Amazon Mem-Cache High Medium Medium
Amazon DynamoDB High Low Low
* Not currently supported by Earth Networks