Advertisement

To Serverless and Beyond

ScyllaDB
ScyllaDB
Feb. 15, 2023
Advertisement

More Related Content

Similar to To Serverless and Beyond(20)

More from ScyllaDB(20)

Advertisement

To Serverless and Beyond

  1. To Serverless and Beyond Dor Laor, Co-founder & CEO
  2. Why ScyllaDB? We asked the smartest entity on earth
  3. ScyllaDB
  4. ScyllaDB
  5. ScyllaDB
  6. ScyllaDB
  7. Why ScyllaDB? Best High Availability in the industry Best Disaster Recovery in the industry Best scalability in the industry Best Price/Performance in the industry Auto-tune - out of the box performance Fully compatible with Cassandra & DynamoDB The power of Cassandra at the speed of Redis No Lock-in Open Source Software
  8. ■ Quick recap for newbies Agenda ■ Journey of 2022 ■ The Future of Fast Data
  9. ScyllaDB Journey Gen #1:Brute Power
  10. Database Scores Database Efficiency Score = ƒ(query/vcpu, workload/ram, cost/storage); Database Over Provision Score = ƒ(idle, tables/clusters, readonly/DCs); Database Scale Score = ƒ(10x scale cost/ability,P99@Scale,Time2scale,Ease of scale); Database Maintenance Score = ƒ(Backup,Repair, Replace,Scale, Upgrade,Observe,Trace); Database Freedom Score = ƒ(License, Environment, Ecosystem tools);
  11. R1 Can I propose a value? Check condition R2 R3 Accept new value Learn decision Decision made o k ! o k ! r o w c h e c k s u m o k ! a c k ok! ScyllaDB Journey Gen #2:Full API, LWT
  12. ScyllaDB Journey Gen#3: CDC,K8S,Indexes,ICS,Alternator
  13. ScyllaDB Journey - ScyllaDB 5.0 ScyllaDB Cloud 2022 Roadmap Today (2022) - Perfect Single Tenant land ■ Extreme efficiency ■ Perfect security & isolation ■ Clear and simple units - servers ■ > 5x Cost effectiveness vs all others ■ Easy to consume
  14. ScyllaDB Journey - ScyllaDB 5.0 ScyllaDB Cloud 2022 Roadmap Today (2022) - Perfect Single Tenant land ■ Extreme efficiency ■ Perfect security & isolation ■ Clear and simple units - servers ■ > 5x Cost effectiveness vs all others ■ Easy to consume Coming - Multi tenancy ■ Separation of compute & storage ■ Serverless, pay per usage ■ Elastic w/ APIs control ■ More efficient than today’s implementation ■ Preserves ScyllaDB goodware™
  15. ■ Quick recap for newbies Agenda ■ Journey of 2022 ■ The Future of Fast Data
  16. 2022: All Weather, All Terrain, High Throughput, Low Latency Database
  17. ■ Performance, performance Isolation, performance ■ Maintenance, Maintenance, Maintenance ■ Consistent metadata by Raft ■ ScyllaDB Cloud serverless - abstract the servers 2022 Highlights
  18. ■ IO Scheduler v5 ■ Per partition rate limit ■ 30% CPU gain coming to enterprise/cloud ■ Distributed aggregates ■ Eliminate exceptions from the IO path ■ Reverse queries ■ I4i ■ Range tombstone v2 Performance, Performance Isolation
  19. ■ v1 max-io-requests ■ V2 bandwidth+iops capacity, statically partitioned ■ V3 cross-shards capacity sharing ■ V4 rate-limiter-based capacity ■ V5 Mixed BW I/O Scheduler V5
  20. ■ v1 max-io-requests ■ V2 bandwidth+iops capacity, statically partitioned ■ V3 cross-shards capacity sharing ■ V4 rate-limiter-based capacity ■ V5 Mixed BW I/O Scheduler V5
  21. ■ v1 max-io-requests ■ V2 bandwidth+iops capacity, statically partitioned ■ V3 cross-shards capacity sharing ■ V4 rate-limiter-based capacity ■ V5 Mixed BW I/O Scheduler V5
  22. ■ v1 max-io-requests ■ V2 bandwidth+iops capacity, statically partitioned ■ V3 cross-shards capacity sharing ■ V4 rate-limiter-based capacity ■ V5 Mixed BW I/O Scheduler V5 Also added per I/O class throttling ■ Compaction ■ Repair ■ Streaming
  23. ■ IO Scheduler v5 ■ Per partition rate limit ■ 30% CPU gain coming to enterprise/cloud ■ Distributed aggregates ■ Eliminate exceptions from the IO path ■ Reverse queries ■ I4i ■ Range tombstone v2 Performance, Performance Isolation SELECT COUNT(*) FROM keyspace.table Return c1 Return c2 Return c3 COUNT ) p0..p1 COUNT ) p2..p3 COUNT ) p4..p5 COUNT ) p6..p7
  24. ■ IO Scheduler v5 ■ Per partition rate limit ■ 30% CPU gain coming to enterprise/cloud ■ Distributed aggregates ■ Eliminate exceptions from the IO path ■ Reverse queries ■ I4i ■ Range tombstone v2 Performance, Performance Isolation 7 1 2 5 7 1 2 5
  25. ■ IO Scheduler v5 ■ Per partition rate limit ■ 30% CPU gain coming to enterprise/cloud ■ Distributed aggregates ■ Eliminate exceptions from the IO path ■ Reverse queries ■ I4i ■ Range tombstone v2 Performance, Performance Isolation
  26. ■ Performance, performance isolation, performance ■ Maintenance, Maintenance, Maintenance ■ Consistent metadata by Raft ■ ScyllaDB Cloud serverless - abstract the servers 2022 Highlights
  27. ■ Auto Tombstone GC ■ Load & stream ■ Auto restore ■ RBNO ■ Consistent Schema changes Maintenance, Maintenance, Maintenance
  28. ■ Auto Tombstone GC ■ Load & stream ■ Auto restore ■ RBNO ■ Consistent Schema changes Maintenance, Maintenance, Maintenance 1-333 334-666 667-1000 1-200 201-400 401-600 601-800 801-1000 201-400 1-200
  29. ■ Auto Tombstone GC ■ Load & stream ■ Auto restore ■ RBNO ■ Consistent Schema changes Maintenance, Maintenance, Maintenance Repair Based Node Operations is in for /all /default ■ Resumable ■ Consistent ■ Simplified ■ Fast ■ Unified
  30. Top-K Queries User defined aggregates = UDF + WASM + Distributed aggregates + Workload prioritization How many people follow Elon Musk? What are the top-k products in shopping carts
  31. Double Click on Database Drivers ■ Maintain Python, Java, Go ■ Huge boost w/ Rust ■ C++ driver, wrapped over Rust ■ Improved load balancing (shard, cache, zone aware) ■ Serverless support ■ Performance
  32. ■ Performance, performance isolation, performance ■ Maintenance, Maintenance, Maintenance ■ Consistent metadata by Raft ■ ScyllaDB Cloud serverless - abstract the servers 2022 Highlights
  33. ■ Raft ■ Consistent Schema changes ■ Consistent topology changes Consistent Metadata by Raft Protocol for state machine replication Total order broadcast of state change commands Single leader X = 0 X += 1 CAS(X, 0, 1) X = 0
  34. ■ Raft ■ Consistent Schema changes ■ Consistent topology changes Consistent Metadata by Raft RAFT Safe schema changes Safe topology changes Dynamic partitioning Consistent tables Tablets 5.0 5.2 5.3
  35. ■ Performance, performance isolation, performance ■ Maintenance, Maintenance, Maintenance ■ Consistent metadata by Raft ■ ScyllaDB Cloud serverless - abstract the servers 2022 Highlights
  36. ■ Quick recap for newbies Agenda ■ Journey of 2022 ■ The Future of Fast Data ■ Serverless ■ Core ScyllaDB
  37. s/server/vcpu/
  38. ■ Abstract the servers, instances. Building block is VCPU ■ Decouple storage from compute. Still uses NVMe ■ Flexibility of annual commit ■ Encryption@rest + BYOK ■ Elasticity ■ API & Terraform ■ Advanced Network gateways ■ Self serve user management & SSO ■ Self serve billing & metering Scylla Cloud Goes Serverless
  39. Vision Old: The power of Cassandra at the speed of Redis New: The power of ScyllaDB, with the usability of DynamoDB
  40. Gamechanger Revolution Today ■ Eventual consistency ■ 3x replication, may not be identical ■ Storage is bound to compute ■ Full scan repair process is required ■ Cheap for high throughput, expensive for high volume Future ■ Raft based consistency ■ No need to repair ■ Single main replica, on S3 ■ Can be cached for performance ■ Save arriving, fresh data in 3 replicas, until sync w/ S3 ■ Point in time recovery, extreme elasticity ■ Cluster parking ■ ~Free disaster recovery backup
  41. Future of Key Ranges ■ token = hash(partition key) ■ token range: set of partition keys token token range token
  42. Each node has a set of tokens assigned during bootstrap Token Metadata - vNodes node A node B node C A C B C A B
  43. Token Metadata - vNodes A C B C A B {A, C} {C, B} {B, A} {C, A} {A, B} {B, C} token metadata replication metadata replication strategy
  44. Future of Key Ranges Today ■ Key ranges =~ vNodes ■ Statically allocated @node creation ■ Size of TBs Coming - Tablets ■ Small range of keys ■ Size GBs-10GB ■ Dynamically controlled ■ Dynamically mapped/moves between nodes
  45. Tablets tablet tablet replica tablet replica tablet replica replication metadata: (per table)
  46. Tablets - Balancing Aim at manageable size: ■ Not too small -> few -> low metadata overhead ■ Not too large -> many -> enough to balance load
  47. Tablets - Balancing The load balancer can decide to move tablets
  48. Tablets Resharding is cheap. SStables split at tablet boundary. Reassign tablets to shards (logical operation).
  49. Tablets Cleanup after topology change is cheap. Just delete SStables.
  50. Today ■ Disaggregated, local NVMe ■ Gravity - time to stream ■ Ultra fast ■ Cheaper than EBS/SAN ■ Expensive if not queried Future of Storage
  51. Future of Storage tablet replica tablet replica Node Node Node Node Node Node Node Nodes w/ NVMe are awesome!
  52. Future of Storage tablet tablet replica tablet replica Node Node Node Node Node Node Node
  53. Today ■ Disaggregated, local NVMe ■ Gravity - time to stream ■ Ultra fast ■ Cheaper than EBS/SAN ■ Expensive if not queried Object Store / S3 based ■ $ almost free ■ Completely decoupled ■ Fully consistent ■ Accessed by all nodes ■ Tiered Storage ■ Slow-> Local NVMe cache Future of Storage
  54. Future of Storage tablet Node Local write Send commitlog Upload S3 Repair & compact
  55. Future of Storage tablet Node ■ Compaction can happen off-query engine ■ Sstables NVME-cached by replicas (Cache-Replication-Factor) ■ Tiered Storage helps to control size of NVMe cache ■ Available for all users (not just DBaaS)
  56. Tablet + S3 + Raft Metadata = G.O.A.T
  57. G.O.A.T Future tablet Node ■ Data in S3 - Low TCO ■ NVMe Configurable Caches == Fast, tiered storage ■ Elasticity ■ Remove nodes - Sync pending to S3 & change table ownership ■ Add nodes ■ many at once ■ New hardware added async from tablet ownership ■ Node can serve data from the first tablet assigned! ■ Get the local NVMe cache populated ■ Point in time Backup/restore ■ Add/remove data-centers easily - access local S3 ■ Cluster parking
  58. Future of Consistency Eventual Consistency Immediate Eventual Consistency
  59. Bring RAFT to user tables! CREATE TABLE foo WITH raft = TRUE; Strongly-Consistent Tables Do not have any databases before ScyllaDB. Always run nodetool cleanup after bootstrapping a new node. Run repair within gc-grace seconds. Do not bootstrap nodes concurrently, or make any other topology change Do not use SimpleStrategy in a multi DC setup Do not have any databases before ScyllaDB. Always run nodetool cleanup after bootstrapping a new node. Run repair within gc-grace seconds. Do not bootstrap nodes concurrently, or make any other topology change Do not use SimpleStrategy in a multi DC setup Do not have any databases before ScyllaDB. Always run nodetool cleanup after bootstrapping a new node. Run repair within gc-grace seconds. Do not bootstrap nodes concurrently, or make any other topology change Do not use SimpleStrategy in a multi DC setup Do not have any databases before ScyllaDB. Always run nodetool cleanup after bootstrapping a new node. Run repair within gc-grace seconds. Do not bootstrap nodes concurrently, or make any other topology change Do not use SimpleStrategy in a multi DC setup
  60. Strongly-Consistent Tables LWT (paxos based) ■ Slow ■ 3 rounds to replicas per user request ■ Concurrent conflicting requests -> retries -> negative scaling RAFT ■ Fast ■ 1 round to replicas (on leader) ■ No retries
  61. 2022 ScyllaDB is great Welcome to Serverless Welcome to the Future Thank You @DorLaor
Advertisement