SlideShare a Scribd company logo
8
Most read
10
Most read
12
Most read
Designing Low-Latency Systems with
Rust: An Architectural Deep Dive
Presented by: Felipe Cardeneti Mendes, Technical Director @ ScyllaDB
Moderated by: Erik Costlow, InfoQ Editor
January 22, 2025
Presenter
Felipe Cardeneti Mendes,
Technical Director
+ Puppy Lover
+ Database Performance at Scale co-Author
+ ScyllaDB passionate!
+ 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
Performance Pitfalls
of Rust Async Function
Pointers (And Why It
Might Not Matter)
Byron Wasti
Founder & CEO at Balter Load Testing
Rust + io_uring + ktls:
How Fast Can We Make
HTTP?
Amos Wenger
Creator of Faster Than Lime
Rust: A Productive
Language for Writing
Database Applications
Carl Lerche
Principal Engineer at AWS
Watch now on-demand at p99conf.io
A ScyllaDB Community
Extreme Scale Engineering | ONLINE | MARCH 11 + 12
Q&A
Contact Us:
Felipe Cardeneti Mendes: felipemendes@scylladb.com
InfoQ: webinars@infoq.com
Thank you
for joining us today.
@scylladb scylladb/
slack.scylladb.com
@scylladb company/scylladb/
scylladb/

More Related Content

Similar to Designing Low-Latency Systems with Rust: An Architectural Deep Dive (20)

PDF
New Ways to Reduce Database Costs with ScyllaDB
ScyllaDB
 
PDF
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
confluent
 
PDF
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear Scalability
ScyllaDB
 
PDF
Distributed Database Design Decisions to Support High Performance Event Strea...
StreamNative
 
PDF
Transforming the Database: Critical Innovations for Performance at Scale
ScyllaDB
 
PPTX
Optimizing Performance in Rust for Low-Latency Database Drivers
ScyllaDB
 
PDF
Leapfrog into Serverless - a Deloitte-Amtrak Case Study | Serverless Confere...
Gary Arora
 
PDF
ScyllaDB Virtual Workshop: Getting Started with ScyllaDB 2024
ScyllaDB
 
PPTX
Time Series Analytics Azure ADX
Riccardo Zamana
 
PDF
Webinar how to build a highly available time series solution with kairos-db (1)
Julia Angell
 
PDF
Webinar: How to build a highly available time series solution with KairosDB
ScyllaDB
 
PPTX
Scylla Virtual Workshop 2022
ScyllaDB
 
PDF
Webinar: The Future of SQL
Crate.io
 
PDF
Keeping your application’s latency SLAs no matter what
ScyllaDB
 
PDF
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Mydbops
 
PDF
Low Latency at Extreme Scale: Proven Practices & Pitfalls
ScyllaDB
 
PPTX
Containerized Hadoop beyond Kubernetes
DataWorks Summit
 
PDF
Webinar: SQL for Machine Data?
Crate.io
 
PDF
Exploring Phantom Traffic Jams in Your Data Flows
ScyllaDB
 
PDF
Real time Object Detection and Analytics using RedisEdge and Docker
Ajeet Singh Raina
 
New Ways to Reduce Database Costs with ScyllaDB
ScyllaDB
 
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
confluent
 
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear Scalability
ScyllaDB
 
Distributed Database Design Decisions to Support High Performance Event Strea...
StreamNative
 
Transforming the Database: Critical Innovations for Performance at Scale
ScyllaDB
 
Optimizing Performance in Rust for Low-Latency Database Drivers
ScyllaDB
 
Leapfrog into Serverless - a Deloitte-Amtrak Case Study | Serverless Confere...
Gary Arora
 
ScyllaDB Virtual Workshop: Getting Started with ScyllaDB 2024
ScyllaDB
 
Time Series Analytics Azure ADX
Riccardo Zamana
 
Webinar how to build a highly available time series solution with kairos-db (1)
Julia Angell
 
Webinar: How to build a highly available time series solution with KairosDB
ScyllaDB
 
Scylla Virtual Workshop 2022
ScyllaDB
 
Webinar: The Future of SQL
Crate.io
 
Keeping your application’s latency SLAs no matter what
ScyllaDB
 
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Mydbops
 
Low Latency at Extreme Scale: Proven Practices & Pitfalls
ScyllaDB
 
Containerized Hadoop beyond Kubernetes
DataWorks Summit
 
Webinar: SQL for Machine Data?
Crate.io
 
Exploring Phantom Traffic Jams in Your Data Flows
ScyllaDB
 
Real time Object Detection and Analytics using RedisEdge and Docker
Ajeet Singh Raina
 

More from ScyllaDB (20)

PDF
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
PDF
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
PDF
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
PDF
Powering a Billion Dreams: Scaling Meesho’s E-commerce Revolution with Scylla...
ScyllaDB
 
PDF
Leading a High-Stakes Database Migration
ScyllaDB
 
PDF
Achieving Extreme Scale with ScyllaDB: Tips & Tradeoffs
ScyllaDB
 
PDF
Securely Serving Millions of Boot Artifacts a Day by João Pedro Lima & Matt ...
ScyllaDB
 
PDF
How Agoda Scaled 50x Throughput with ScyllaDB by Worakarn Isaratham
ScyllaDB
 
PDF
How Yieldmo Cut Database Costs and Cloud Dependencies Fast by Todd Coleman
ScyllaDB
 
PDF
ScyllaDB: 10 Years and Beyond by Dor Laor
ScyllaDB
 
PDF
Reduce Your Cloud Spend with ScyllaDB by Tzach Livyatan
ScyllaDB
 
PDF
Migrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence Liu
ScyllaDB
 
PDF
Vector Search with ScyllaDB by Szymon Wasik
ScyllaDB
 
PDF
Workload Prioritization: How to Balance Multiple Workloads in a Cluster by Fe...
ScyllaDB
 
PDF
Two Leading Approaches to Data Virtualization, and Which Scales Better? by Da...
ScyllaDB
 
PDF
Scaling a Beast: Lessons from 400x Growth in a High-Stakes Financial System b...
ScyllaDB
 
PDF
Object Storage in ScyllaDB by Ran Regev, ScyllaDB
ScyllaDB
 
PDF
Lessons Learned from Building a Serverless Notifications System by Srushith R...
ScyllaDB
 
PDF
A Dist Sys Programmer's Journey into AI by Piotr Sarna
ScyllaDB
 
PDF
High Availability: Lessons Learned by Paul Preuveneers
ScyllaDB
 
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
Powering a Billion Dreams: Scaling Meesho’s E-commerce Revolution with Scylla...
ScyllaDB
 
Leading a High-Stakes Database Migration
ScyllaDB
 
Achieving Extreme Scale with ScyllaDB: Tips & Tradeoffs
ScyllaDB
 
Securely Serving Millions of Boot Artifacts a Day by João Pedro Lima & Matt ...
ScyllaDB
 
How Agoda Scaled 50x Throughput with ScyllaDB by Worakarn Isaratham
ScyllaDB
 
How Yieldmo Cut Database Costs and Cloud Dependencies Fast by Todd Coleman
ScyllaDB
 
ScyllaDB: 10 Years and Beyond by Dor Laor
ScyllaDB
 
Reduce Your Cloud Spend with ScyllaDB by Tzach Livyatan
ScyllaDB
 
Migrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence Liu
ScyllaDB
 
Vector Search with ScyllaDB by Szymon Wasik
ScyllaDB
 
Workload Prioritization: How to Balance Multiple Workloads in a Cluster by Fe...
ScyllaDB
 
Two Leading Approaches to Data Virtualization, and Which Scales Better? by Da...
ScyllaDB
 
Scaling a Beast: Lessons from 400x Growth in a High-Stakes Financial System b...
ScyllaDB
 
Object Storage in ScyllaDB by Ran Regev, ScyllaDB
ScyllaDB
 
Lessons Learned from Building a Serverless Notifications System by Srushith R...
ScyllaDB
 
A Dist Sys Programmer's Journey into AI by Piotr Sarna
ScyllaDB
 
High Availability: Lessons Learned by Paul Preuveneers
ScyllaDB
 
Ad

Recently uploaded (10)

PPTX
Summer Fashion Versus Luxury Fashion Which is India’s beauty bloom.pptx
dikefashiondigital
 
PDF
Top 5 Zodiac Signs 2025 with Future Predictions
ChrisEvans806277
 
PPTX
Jewellery Brand Dileti Basic SEO Audit.pptx
siddharthsen25
 
PDF
Where Feast Becomes Fest: The Art of Serving by Kairaus
Trisha Singh
 
PDF
How to Repair Broken Trust After Betrayal | Steps to Heal a Relationship
ClicktoQuery
 
PDF
What I’ve Learned From Loving Temitope Falese.pdf
Sam Temitope Falese
 
PPTX
Fun_Friday_emojimoviegame_which inlude.pptx
AnandAgrawal100
 
PPTX
Pink and Brown Monthly Report Presentation.pptx
hg1857459
 
PPTX
oral hygiene hagaveysvstebsydvdheheyeyegeyevsge
nisanthkb2
 
PPT
Agriculture and village life, Domestication of plants & animals
manjuh22
 
Summer Fashion Versus Luxury Fashion Which is India’s beauty bloom.pptx
dikefashiondigital
 
Top 5 Zodiac Signs 2025 with Future Predictions
ChrisEvans806277
 
Jewellery Brand Dileti Basic SEO Audit.pptx
siddharthsen25
 
Where Feast Becomes Fest: The Art of Serving by Kairaus
Trisha Singh
 
How to Repair Broken Trust After Betrayal | Steps to Heal a Relationship
ClicktoQuery
 
What I’ve Learned From Loving Temitope Falese.pdf
Sam Temitope Falese
 
Fun_Friday_emojimoviegame_which inlude.pptx
AnandAgrawal100
 
Pink and Brown Monthly Report Presentation.pptx
hg1857459
 
oral hygiene hagaveysvstebsydvdheheyeyegeyevsge
nisanthkb2
 
Agriculture and village life, Domestication of plants & animals
manjuh22
 
Ad

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

  • 1. Designing Low-Latency Systems with Rust: An Architectural Deep Dive Presented by: Felipe Cardeneti Mendes, Technical Director @ ScyllaDB Moderated by: Erik Costlow, InfoQ Editor January 22, 2025
  • 2. Presenter Felipe Cardeneti Mendes, Technical Director + Puppy Lover + Database Performance at Scale co-Author + ScyllaDB passionate!
  • 3. + 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
  • 4. +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
  • 5. Agenda + Background: Why Rust, Tokio, ScyllaDB? + App Walkthrough + The ScyllaDB Rust driver + Let's break it!
  • 6. 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
  • 7. + 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
  • 8. 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
  • 9. Poll: How proficient are you with the Rust language?
  • 10. 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
  • 11. BUT... We need a Driver! :-)
  • 13. 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
  • 14. 1. cargo add scylla 2. Follow examples 3. Profit! Getting Started
  • 17. Performance Pitfalls of Rust Async Function Pointers (And Why It Might Not Matter) Byron Wasti Founder & CEO at Balter Load Testing Rust + io_uring + ktls: How Fast Can We Make HTTP? Amos Wenger Creator of Faster Than Lime Rust: A Productive Language for Writing Database Applications Carl Lerche Principal Engineer at AWS Watch now on-demand at p99conf.io
  • 18. A ScyllaDB Community Extreme Scale Engineering | ONLINE | MARCH 11 + 12
  • 20. Thank you for joining us today. @scylladb scylladb/ slack.scylladb.com @scylladb company/scylladb/ scylladb/