Felipe Cardeneti Mendes, Technical Director, ScyllaDB
Designing Low-Latency Systems
with Rust and ScyllaDB
An Architectural Deep Dive
Presenter
Felipe Cardeneti Mendes,
Technical Director
+ Puppy Lover
+ Database Performance at Scale co-Author
+ ScyllaDB committer
+ For data-intensive applications that require high
throughput and predictable low latencies
+ Close-to-the-metal design takes full advantage of
modern infrastructure
+ >5x higher throughput
+ >20x lower latency
+ >75% TCO savings
+ Compatible with Apache Cassandra and Amazon
DynamoDB
+ DBaaS/Cloud, Enterprise solutions
The Database for Gamechangers
“ScyllaDB stands apart...It’s the rare product
that exceeds my expectations.”
– Martin Heller, InfoWorld contributing editor and reviewer
“For 99.9% of applications, ScyllaDB delivers all the
power a customer will ever need, on workloads that other
databases can’t touch – and at a fraction of the cost of
an in-memory solution.”
– Adrian Bridgewater, Forbes senior contributor
+400 Gamechangers Leverage ScyllaDB
Seamless experiences
across content + devices
Corporate fleet
management
Real-time analytics 2,000,000 SKU -commerce
management
Video recommendation
management
Threat intelligence service
using JanusGraph
Real time fraud detection
across 6M transactions/day
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
Agenda + Background: Why Rust, Tokio, ScyllaDB?
+ App Walkthrough
+ The ScyllaDB Rust driver
+ Let's break it!
IOT Rust Application Setup
$ git clone https://github.com/fee-mendes/rust-driver-example.git
$ cd rust-driver-example/docker-compose
$ docker compose up -d
$ docker exec -it rust-app /bin/bash
Minimum requirements:
+ Linux, macOS, Windows
+ On Windows you might need to adjust Docker network settings
+ Docker installed and setup
+ Quadcore CPU
+ 2 GB of memory available
+ Asynchronous, non-blocking runtimes
+ Tokio: Most widely used Rust runtime
+ Seastar: C++ runtime for ScyllaDB
+ Fast, flexible, and reliable
+ Scalable, allows high concurrency and low latency
+ Green and sustainable
Why Rust? Why Tokio? Why ScyllaDB?
Rust Driver ScyllaDB
Low latency, close
to hardware schedulers
Perfect horizontal & vertical scale
1000 Nodes Cluster
2000 Cluster
K8S Deployment
TBs per Node 256 Cores per Node
1B Operations
per Second
About ScyllaDB: Fast and Scalable
Poll:
How proficient are
you with the Rust
language?
IOT Application Overview
Metric Collector Metric Reader UUID Finder
Write to ScyllaDB in parallel
Deploy schema (ks/tables)
Generate data:
100 devices
3 days
Every 5 minutes
Device metrics aggregator
Analytics sample
Split token-ring in small parts:
Efficient full table scan
token() function usage
BYPASS CACHE
Single device queries
Real-time sample
Partition scan:
MAX(), AVG(), MIN()
Range queries
Date/Time handling
BUT...
We need a Driver! :-)
ScyllaDB Native Rust Driver
Rust Bindings
ScyllaDB cpp-rust-driver
Rust Driver
C/C++ API
Community scyllapy Driver
Rust Driver
Python API
➹ Wrapper libraries using language's FFIs (foreign function interface) feature
➹ Make an existing library written in language X usable in others
1. cargo add scylla
2. Follow examples
3. Profit!
Getting Started
Crate Features
See SerializeCql
Let's Code
Thank you
for joining us today.
@scylladb scylladb/
slack.scylladb.com
@scylladb company/scylladb/
scylladb/

Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive

  • 1.
    Felipe Cardeneti Mendes,Technical Director, ScyllaDB Designing Low-Latency Systems with Rust and ScyllaDB An Architectural Deep Dive
  • 2.
    Presenter Felipe Cardeneti Mendes, TechnicalDirector + Puppy Lover + Database Performance at Scale co-Author + ScyllaDB committer
  • 3.
    + For data-intensiveapplications that require high throughput and predictable low latencies + Close-to-the-metal design takes full advantage of modern infrastructure + >5x higher throughput + >20x lower latency + >75% TCO savings + Compatible with Apache Cassandra and Amazon DynamoDB + DBaaS/Cloud, Enterprise solutions The Database for Gamechangers “ScyllaDB stands apart...It’s the rare product that exceeds my expectations.” – Martin Heller, InfoWorld contributing editor and reviewer “For 99.9% of applications, ScyllaDB delivers all the power a customer will ever need, on workloads that other databases can’t touch – and at a fraction of the cost of an in-memory solution.” – Adrian Bridgewater, Forbes senior contributor
  • 4.
    +400 Gamechangers LeverageScyllaDB Seamless experiences across content + devices Corporate fleet management Real-time analytics 2,000,000 SKU -commerce management Video recommendation management Threat intelligence service using JanusGraph Real time fraud detection across 6M transactions/day 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
  • 5.
    Agenda + Background:Why Rust, Tokio, ScyllaDB? + App Walkthrough + The ScyllaDB Rust driver + Let's break it!
  • 6.
    IOT Rust ApplicationSetup $ git clone https://github.com/fee-mendes/rust-driver-example.git $ cd rust-driver-example/docker-compose $ docker compose up -d $ docker exec -it rust-app /bin/bash Minimum requirements: + Linux, macOS, Windows + On Windows you might need to adjust Docker network settings + Docker installed and setup + Quadcore CPU + 2 GB of memory available
  • 7.
    + Asynchronous, non-blockingruntimes + Tokio: Most widely used Rust runtime + Seastar: C++ runtime for ScyllaDB + Fast, flexible, and reliable + Scalable, allows high concurrency and low latency + Green and sustainable Why Rust? Why Tokio? Why ScyllaDB? Rust Driver ScyllaDB
  • 8.
    Low latency, close tohardware schedulers Perfect horizontal & vertical scale 1000 Nodes Cluster 2000 Cluster K8S Deployment TBs per Node 256 Cores per Node 1B Operations per Second About ScyllaDB: Fast and Scalable
  • 9.
    Poll: How proficient are youwith the Rust language?
  • 10.
    IOT Application Overview MetricCollector Metric Reader UUID Finder Write to ScyllaDB in parallel Deploy schema (ks/tables) Generate data: 100 devices 3 days Every 5 minutes Device metrics aggregator Analytics sample Split token-ring in small parts: Efficient full table scan token() function usage BYPASS CACHE Single device queries Real-time sample Partition scan: MAX(), AVG(), MIN() Range queries Date/Time handling
  • 11.
    BUT... We need aDriver! :-)
  • 12.
  • 13.
    Rust Bindings ScyllaDB cpp-rust-driver RustDriver C/C++ API Community scyllapy Driver Rust Driver Python API ➹ Wrapper libraries using language's FFIs (foreign function interface) feature ➹ Make an existing library written in language X usable in others
  • 14.
    1. cargo addscylla 2. Follow examples 3. Profit! Getting Started
  • 15.
  • 16.
  • 17.
    Thank you for joiningus today. @scylladb scylladb/ slack.scylladb.com @scylladb company/scylladb/ scylladb/