Skip to main content
Uriel Bitton, AWS Cloud Consultant, Dynasight
Guilherme Nogueira, Technical Director, ScyllaDB
DynamoDB Data Modeling
for Performance
Guilherme Nogueira
2
+ Technical Director @ ScyllaDB
+ Previously Solutions Architect
+ Publishing
+ Streaming
+ Automotive
+ Helping users be successful at scale
Uriel Bitton
3
+ AWS Cloud Consultant
+ DynamoDB data modelling consultant
+ Founder of Dynasight
+ Helping startups understand DynamoDB and build
scalable & cost efficient databases on AWS.
Dynasight
Agenda
4
+ What is ScyllaDB
+ ScyllaDB Alternator for DynamoDB workloads
+ Design patterns
+ Modeling around limitations
+ Index performance
+ Hybrid Vector Search with Alternator
+ Q&A
+ Wrap
What is ScyllaDB?
5
6
Shard-per-Core
Unique Close-to-Metal Architecture
Built in C++
Everything
Asynchronous
Shared Nothing Shard per Core Specialized Cache
Network
Processor NUMA
Storage
Shards (per core)
uniqu
e
ScyllaDB technology
Guaranteed SLA
Perfect horizontal & Vertical Scale
1000 Nodes Cluster
8000 Cluster
K8S Deployment
+200TB per Node >256 Cores per Node
1B Operations
per Second
Userspace
I/O Scheduler
Disk
Query
Commitlog
Compaction
Queue
Queue
Queue
0.5msec
Shards (per core)
uniqu
e
ScyllaDB technology
+400 Gamechangers Leverage ScyllaDB
Seamless experiences
across content + devices
Corporate fleet
management
Real-time analytics 2,000,000 SKU -commerce
management
Video recommendation
management
Low-latency global sports
betting
Real time fraud detection for
6M daily transactions
Uber scale, mission critical
chat & messaging app
Network security threat
detection
Power ~50M X1 DVRs with
billions of reqs/day
Precision healthcare via
Edison AI
Inventory hub for retail
operations
Property listings and
updates
Cryptocurrency exchange
app
Geography-based
recommendations
Global operations- Avon,
Body Shop + more
Predictable performance for
on sale surges
GPS-based exercise
tracking
Serving dynamic live
streams at scale
Powering India's top
social media platform
Personalized
advertising to players
Distribution of game
assets in Unreal Engine
Real-time ML-driven
recommendations
Connecting millions of
people around the globe
9
ScyllaDB Alternator
For DynamoDB workloads
Efficiency
Shard-per-core Workload
Prioritization
Built-in cache Capacity-based
Pricing
Throttling-free
Scaling
Cloud agnostic
10
ScyllaDB's DynamoDB-compatible API
+ Native DynamoDB API
+ Same efficiency
+ Works as-is
+ No changes to table or queries
11
+ Run anywhere
+ Any cloud, VM, k8s, bare metal
+ Tables, Indexes, Streams
+ Types, drivers
Question: What are your main challenges with DynamoDB?
● High throughput use-cases
● Latency
● Cost
● Lock-in
● Others (tell us in chat!)
Poll time
Why design for performance?
13
+ Built to scale
+ Performs the same @ 10GB, 10TB datasets
+ Restrictions enforced for performance
+ Strict primary keys
+ Physical separation of the data
+ Hard limits (item and page sizes)
+ Requires change of mindset
+ Especially from Relational world
14
DynamoDB design
15
Access-pattern-driven design
+ Relational model
+ Start with the data
+ Joins, Foreign Keys…
+ Performance issues = Indexes
+ Lower learning curve
+ Harder to scale
+ Favors flexibility
16
Start with the queries
+ NoSQL model
+ Start with the access patterns
+ Read
+ Write
+ Map keys to allow precise fetches
+ Point queries
+ “Pre-join” the data
+ Designed for scalability
+ Trades-off performance vs flexibility
How is data accessed?
+ Read paths
+ Map Primary Key, Sort Key
+ Map necessary Indexes
+ Write paths
+ How does data flow into your system?
+ Real-time
+ Batch
+ Inserts, updates, appends, deletes
+ Plan for write efficiency
+ Point writes
+ Batches for multiple items
17
Access patterns
Partition key strategies
18
19
Tables must be designed around queries.
+ Design partition keys for highly granular access
+ How to map cardinality early on?
+ Why is cardinality important?
+ Uniqueness
+ Users interact with different parts of the database
+ Avoid tripping limits
DynamoDB Table Structure
20
Model around DynamoDB
limitations
They are there for a reason.
But often surprises users.
+ 400KB max Item size
+ Pagination
+ 1MB page size
+ What happens when Filter is applied?
+ Indexes consume Units and not obvious cost
+ How does it work on ScyllaDB Alternator?
21
DynamoDB Limits
Index design and performance
22
But present a challenge for design.
+ Cardinality in Indexes
+ What happens if 99.9% of Items have State = ACTIVE?
+ Write overhead
+ Cost
+ But also performance
+ What happens if State = ACTIVE exceeds ops threshold?
+ Best practices
+ Beware of projection (KEYS_ONLY, INCLUDE, ALL)
+ 20 GSIs per table – never do that!
+ Leverage Sparse Indexes
+ Skips items without the indexed attribute name
23
Indexes are powerful
Hybrid Vector Search with
Alternator
Integrated Vector Search for DynamoDB workloads
24
+ Part of ScyllaDB Cloud
+ Index ScyllaDB Data using
Alternator API
+ High Throughput per core
+ Low Consistent Latency
ScyllaDB Vector Search
25
26
Vector Search
Vector Database
Saved in Searched in
Embeddings Embeddings
Document
Image
Audio
Transformed
into
User’s
Search Query
Transformed
into
1 2
3
Perform Similarity Search
Accurate Search Result
To Provide
Q&A
27
28
Wrap up
Designing for DynamoDB performance requires careful planning
+ Key cardinality
+ Choice of Indexes
+ Types of operations
ScyllaDB is a valid DynamoDB replacement:
+ DynamoDB-compatible API
+ Run applications anywhere
+ Better performance
+ Lower cost
29
Wrap-up
Thank you
for joining us today.
@scylladb scylladb/
slack.scylladb.com
@scylladb company/scylladb/
scylladb/
Uriel Bitton
uriel@dynasight.app
linkedin.com/in/urielbitton
Guilherme Nogueira (Gui)
guilherme.nogueira@scylladb.com