Why We Chose ScyllaDB over DynamoDB for "User Watch Status"
ScyllaDB
284 views
27 slides
Jun 19, 2024
Slide 1 of 27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
About This Presentation
Yichen Wei and Adam Drennan share the architecture and technical requirements behind "user watch status" for a major global media streaming service, what that meant for their database, the pros and cons of the many options they considered for replacing DynamoDB, why they ultimately chose S...
Yichen Wei and Adam Drennan share the architecture and technical requirements behind "user watch status" for a major global media streaming service, what that meant for their database, the pros and cons of the many options they considered for replacing DynamoDB, why they ultimately chose ScyllaDB, and their lessons learned so far.
Size: 6.17 MB
Language: en
Added: Jun 19, 2024
Slides: 27 pages
Slide Content
Why We Chose ScyllaDB over DynamoDB for "User Watch Status" Yichen Wei & Adam Drennan
Why choose ScyllaDB over others? The Story Reason behind the choice Options? SQL/NoSQL/NewSQL/DistSQL? Why ScyllaDB? The User Case Takeaways
Yichen Wei HA Distributed Platform domains including ML, microservices and HPC Evangelist HTAP, Rust and FP/CT WASM/WASI Your photo goes here, smile :)
Adam Drennan Backend software engineer with focus on HA, low-latency distributed systems Kotlin for backend evangelist Your photo goes here, smile :)
The User Story
The Story
Mickey: I want to resume the movie watched last time. Mickey: I want to know if I’ve seen this show before. The Story
The Story
User Experience First Speed Availability Scalability Fault tolerance Cloud first - AWS Reduced cost Design for future The Story and Goals
Multi-region 170k+ WPS Edge SLA - Nearline update Conditional updates based on event timestamp 78k+ RPS P99 Read latency < 10-20ms Simple point queries Large history data set > 10TB The Story and Goals
DB Choices
Choose the right DB is not easy https://dbdb.io/ 959+ databases Infra maintenance and upgrade - zero downtime, cloud International Distributed - Multi-region Multi-country Transaction, To be or not to be? SQL or noSQL? noSQL -> not only SQL CDC? … Options
Aurora? Aurora is good Disaggregated Storage and Compute Architecture Multi-Primary Write New Serverless(Wow) Not for us Write throughput Price Options
Why not DynamoDB? DynamoDB is good Multi-region Auto-scale Less maintenance Not for us Price SDK Options
Other databases ? NoSQL is - No SQL - 2010 Not only SQL - 2020 New/Dist SQL HTAP Scalability Not for us Write throughput Maintenance Options
We used to use C* heavily Delegated C* team Multi-region build-in clusters in On-Premise datacenters Multi-region build-in clusters in AWS How About Cassandra?
We used to use C* heavily But issues during maintenance and migration Spikes caused by GC -> GC tuning and upgrading Heterogeneous hardware in different datacenter/cloud -> Numa tuning CDC is complicated Didn’t utilize the modern hardwares -> RDMA, Numa aware … Many JVM related issues like above How About Cassandra?
DB Choice
DB Choice
Plan Create Scylla Cloud test cluster 6x i4i.4xlarge nodes with replication factor: 3 Pre-load cluster with 3 billion records Run combined load tests of 170k WPS and 78k RPS POC app uses Scylla shard-aware driver for Java Queries based on composite primary key Rely on custom query timestamps for event ordering Monitor metrics using Scylla Cloud Grafana dashboard Scylla Proof of Concept
Iterative Config Changes Working with Scylla Team Set speculative retry to 7ms Throttled max concurrent requests to 4 after Scylla team saw excessive queueing Final Results Able to hit combined load with no errors P99 read latency = 9ms P99 write latency < 1ms Scylla Proof of Concept
Features we like in ScyllaDB Performance Seastar -> C++, no GC, Numa aware ICS(Incremental Compaction Strategy) Shared nothing architecture - the scylla driver Flexible CL and RF for single/multi region(s) Leaderless - maintenance w/o end-user awareness DB Choice
Features we like in ScyllaDB WASM UDF Flexible Update Timestamp Active community DB Choice
Features we like in ScyllaDB Cloud Frugal architect - BYOC Zero maintenance Terraform DB Choice
Features we like in Scylla(Hope in Scylla Cloud in the future) DPDK support SAI Customized storage/index interface DB Choice
Choose a database is hard - One to rule them all Cloud makes is harder - Frugal architecture Serverless is not silver bullet Hardware will play an important role Takeaways