DynamoDB Cost Optimization Masterclass: ScyllaDB as a DynamoDB Alternative

ScyllaDB 34 views 19 slides Aug 09, 2024
Slide 1
Slide 1 of 19
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19

About This Presentation

How to assess whether ScyllaDB is a good fit and what a migration typically involves.


Slide Content

ScyllaDB as a DynamoDB
Alternative
Felipe Cardeneti Mendes

Felipe Cardeneti Mendes
●Technical Director at ScyllaDB
●Linux and Open Source enthusiast
●ScyllaDB Passionate

ScyllaDB and
DynamoDB

When is ScyllaDB an overkill?
■ScyllaDB is a distributed leaderless database
○3 nodes at least
○NVMe flash storage:
■Faster
■Less Expensive than EBS
■Primary dimensions to watch out:
○Low Throughput – Infrastructure underutilization;
○Storage Growth – High density tables → Infrastructure overhead
■Did you know DynamoDB charges you for RAW uncompressed data? :-)
■Secondary dimensions:
○Dependency on AWS ecosystem – Requires considerable refactoring effort
○Feature set – Expiration Events, Accounting/Capping, Multi-item transactions

Comparison
Overview (and gotchas)

ScyllaDB Specific Considerations (and Features)
■Workload Prioritization
○Helps with workload consolidation
○Adaptability to Changing Conditions
○Addresses the "too many tables" problem
■Excess capacity is shared
■Enhanced infrastructure utilization

ScyllaDB Specific Considerations (and Features)
■Specialized Cache
○Read-through – No consistency
concerns
○Built-in
○Simplified operations

ScyllaDB Specific Considerations (and Features)
■Elasticity
○Tablets are here! :-)
○Still no "autoscaling" – but easily
achievable
○Instant request serving

DynamoDB: When to
Move Out?

Reason 1: You Keep Throwing Money at it
You know how much you pay, very little about why?
■Writes are considerably more expensive than Reads
■Single table design → More indexes → Higher price/ops
■Global Tables, Dynamo Streams, S3, DAX, Streams… Woot!

Reason 2: Throttling
Also known as ProvisionedThroughputExceededException :
■Force you to back-off, introducing a latency penalty
■Far easy to hit
■Non-tunable load shedding mechanics

Reason 3: You know what DAX stands for
… and now you have two different animals to manage! :-)
■Doesn't sustain single-digit millisecond latencies at scale
■Cache helps, but comes with its own nuances:
○Write to DDB → Read from cache → Stale read!
○Writes are still synchronous
○No tightly coupling: Strongly consistent reads still require Dynamo
■Adds latency!

Reason 4: Limits, Troubleshooting & Observability
Common blockers:
■400KB Item size limit
■Local Secondary Indexes require… Re-creating the table?
■Developer Flexibility: DynamoDB Local?
■Little integration off AWS ecosystem
■Single-table organization & Querying inflexibility

Reason 5: Auto-scaling
No silver bullet, and still requires thorough planning:
■Avoids provisioning for peak capacity, BUT;
■Works best for gradual increases or decreases in traffic
■Burst capacity handles occasional spikes
AWS DynamoDB Auto Scaling is not a magic bullet

DynamoDB: How to
Move Out?

Query Language
Supported protocols:
■CQL – Binary protocol
○Native load balancing
○Parallel Request Multiplexing
○Prepared statements, token/shard awareness…
■DynamoDB API – JSON over HTTP(S)
○Requires a load balancer
○Drivers tend to need to open more connections
○No notion of prepared statements nor consistent hashing

Migration Nutshell
Client
Writes / Reads
Enable DynamoDB
Streams
Reads Writes
Consume Changes
Sync Changes
Writes / Reads
ScyllaDB Migrator

What Else?

Keep in touch!
Felipe Mendes
Technical Director
ScyllaDB

[email protected]
LinkedIn
Tags