Alternator is ScyllaDB’s API compatible with Amazon DynamoDB. Alternator allows you to go beyond the AWS perimeter to run your workload everywhere, on any cloud or on premises, without a single line of code change.
The session will show how to save costs by moving workloads from Amazon DynamoDB to ScyllaDB Alternator using real-life examples.
We will give an insight into the Alternator development process and road-map and demonstrate how to use it on Scylla Cloud for production and your local machine for testing.
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Use ScyllaDB Alternator to Use Amazon DynamoDB API, Everywhere, Better, More Affordable, All at Once
1. Use ScyllaDB to Replace Amazon
DynamoDB: Everywhere, Better,
More Affordable, All at Once
Tzach Livyatan, VP of Product
2. Tzach Livyantan
■ ScyllaDB, VP Product
■ Tzach has a 20 year career in development, system
engineering and product management. He has worked
in the Telecom domain, focusing on carrier grade
systems, signalling, policy and charging applications
for Oracle and others.
3. ■ Head to Head: Comparing Amazon DynamoDB to ScyllaDB
■ ScyllaDB Alternator - DynamoDB Compatible API
■ Migrating from Amazon DynamoDB to ScyllaDB
Agenda
4. Summary
■ ScyllaDB is compatible with Amazon DynamoDB and can run on
multiple platforms
■ ScyllaDB is less expensive and has lower tail latency than Amazon
DynamoDB
■ You can migrate from Amazon DynamoDB to ScyllaDB without
downtime
6. Test Setup
■ YCSB 0.18.0+
■ ScyllaDB Enterprise 2022.2
■ ScyllaDB Cluster: 3 nodes - i4i.2xlarge on us-east-1 zones b,c,d
■ Loaders: 8 nodes of c5.2xlarge
■ Each loader machine runs 3 instances of YCSB with 40 threads total of 18 processes
with parallelism of 720 (Tried with 50 threads- 900 parallelism and it is not better)
■ Preload of 1TB
■ Throughput was set to 70% of the maximum (burst)
■ Workload distribution: Uniform, Zipfian, Hotspot
■ Payload of 1.1kb
■ 10 columns of 100 bytes (YCSB's default)
7. ■ Choose the right number of loaders / threads/ connection to maximize the
DB (not the loaders)
■ Choose the right distribution and parameters (e.g. Zipfian is very bad for
DynamoDB)
■ Build a reproducible setup to run and collect results
■ Understand loader implementation and issues (e.g. Coordinated Omission)
■ Understand DB limitations (e.g. DynamoDB per partition rate limit)
Why Testing is Hard
16. DynamoDB hard limit: Partition throughput per sec:
■ 3,000 Read Capacity Units (RCUs)
■ 1,000 Write Capacity Units (WCUs)
■ Long (2.5 sec) wait for every fail request
Why DynamoDB Might Not Match Provisioned
Capacity?
More info on DynamoDB limits: https://www.alexdebrie.com/posts/dynamodb-limits/
19. DynamoDB On Demand vs Provisioned
9 tables, each with
20K sustained capacity
20. DynamoDB On Demand vs Provisioned
- Max capacity for *all* tables 9 * 100K =
900K ops: 1,299,423$ yearly cost
- Base 20K with 100K peak (72h) 509,311$
yearly cost (assuming fast enough scaling)
https://calculator.aws/#/estimate?id=5450b405778770d0816f2430eec10ef19523301c
9 tables, each with
20K sustained capacity
And 100K peak!
21. DynamoDB On Demand vs Provisioned
9 tables, each with
20K sustained capacity
And 100K peak!
- 250K ops is more than enough
to support bursts
- $ 58,344 yearly on Scylla Cloud.
x22 less expensive than
Dynamo!
https://price-calc.gh.scylladb.com/?writes=125000&reads=125000&storage=1&itemSize=1
&replication=3
23. Two Swords ScyllaDB!
Amazon DynamoDB Compatible API
+ Production Ready
+ Protocol / Driver level compatibility
+ Drop and drop-in replacement
+ Available on K8s
+ REST / HTTP(S)
Apache Cassandra Compatible API
+ Production Ready
+ Protocol / Driver level compatibility
+ Drop and replace
+ Available on K8s
+ Binary Protocol (CQL)
23
24. What is Alternator?
■ ScyllaDB started with Cassandra APIs (CQL).
■ Alternator: a DynamoDB-compatible API.
■ Alternator is part of ScyllaDB - not separate nodes or executable.
■ Run everywhere
■ Run locally
■ Run on any Cloud
25. Alternator Timeline
September 2019 First open-source release
April 2020 Open-source GA (ScyllaDB 4.0)
June 2020 ScyllaDB Cloud
July 2020 First paying customer
August 2020 ScyllaDB Enterprise (2020.1)
September 2020
Jan 2023
AWS Outposts
ScyllaDB Enterprise (2022.2)
26. Alternator Customer Use Case
AWS i3 instances
3 clusters - 18 nodes in total
Peak query per second: around 400k/s
Data volume ~8.5TB
Estimated cost on
■ DynamoDB: 90K + 12*73,538 = 972K per year (reserved)
■ ScyllaDB Cloud: 12 * 17,019 = 204K per year (reserved)
32. Roadmap Features
■ Point in time Backup (backup is supported via ScyllaDB Manager)
■ Export and import to/from S3
■ Pay per operation
■ Multi Item Transactions
■ DAX caching - not required with ScyllaDB superior performance
33. Trying Alternator
To try Alternator quickly, you can:
■ Create an Alternator cluster on ScyllaDB Cloud
■ Run one Alternator node on your machine in 5 minutes, using docker:
docker pull scylladb/scylla:latest
docker run --name scylla -d -p 8000:8000
scylladb/scylla:latest --alternator-port=8000
--alternator-write-isolation=always
37. Write to DynamoDB
Forklifting Existing Data
DBs in Sync
Time
Read from DynamoDB
Write to ScyllaDB
Live Migration
37
Updates from DynamoDB Stream
38. Dual Reads
Write to DynamoDB
Forklifting Existing Data
Validation
DBs in Sync
Time
Read from ScyllaDB
Read from DynamoDB
Write to ScyllaDB
Live Migration
38
Updates from DynamoDB Stream
39. Dual Reads
Write to DynamoDB
Forklifting Existing Data
Validation
DBs in Sync
Time
Read from ScyllaDB
Fade off
DynamoDB
Read from DynamoDB
Write to ScyllaDB
Live Migration
39
Updates from DynamoDB Stream
40. ■ Highly resilient to failures
■ Access compatible Databases using a native connector
■ High performance parallelized reads and writes
■ Support transformations
■ Open Source!
SQL
NoSQL
ScyllaDB Migrator
40
42. Summary
■ ScyllaDB is compatible with Amazon DynamoDB and can run on
multiple platforms
■ ScyllaDB is less expensive and has lower tail latency than Amazon
DynamoDB
■ You can migrate from Amazon DynamoDB to ScyllaDB without
downtime
43. Thank You
Stay in Touch
Tzach Livyatan
tzach@scylladb.com
@TzachL
@tzach