SlideShare a Scribd company logo
PRESENTED BY
Work stealing for fun & profit:
Making Redis do things you thought it couldn't
do
Jim Nelson
Internet Archive, Cluster Operations Engineer
Internet Archive / archive.org
Universal Access to All Knowledge
● Nonprofit, founded 1996, based in San Francisco
● Archive of digital and physical media
● Includes Web, books, music, film, software & more
● One million visitors per day
● 22+ years of the Web archived for replay: 300 billion pages
● 30+ million media items
Over 45 petabytes of unique data stored on a
bespoke archival-centric computing cluster located
in San Francisco & Richmond
Internet Archive ♡ Redis
● IA metadata directory service backed by 10-node sharded Redis cluster
● Sharding performed client-side via consistent hashing (PHP, Predis)
● Each node supported by two replicated mirrors (fail-over)
● Specialized Redis instances also used throughout IA’s services, including
○ Wayback Machine
○ Search (item metadata and full-text)
○ Administrative & usage tracking
○ …and more
Before we get started
● I’m assuming you’ve written Redis client code already
● You don’t need to know the exact details of the Redis protocol…
● …but you need some understanding of how Redis “works”
○ single-threaded
○ different data types (strings, hash, sorted sets, etc.)
○ Basic commands (GET, SET, HGET, etc.)
○ transactions (MULTI/EXEC)
Some things I wish
Redis could do
it cannot do today
Redis wishlist
Expire keys only after their time-to-live passes
● Redis may evict volatile keys at any time when under memory pressure
(MAXMEMORY policy)
● EXPIRE marks the key as “volatile”
● If Redis runs out of memory, random volatile keys are freed
Redis wishlist
Expire keys only after their time-to-live passes
There are some situations where it’s not merely important,
but vital the key remains available until the time-to-live expires
(locks, expensive recomputes, leases, etc.)
Redis wishlist
● Our Redis cluster is constantly under memory pressure
● In heavy load, up to 1,000 keys / minute are evicted
● 30+ million media items means 30+ million content identifiers
● All of their metadata are competing for precious bytes on our Redis cluster
Redis wishlist
Deterministic expiration
Examples of keys with important TTLs:
● Distributed locks (Redlock, etc.)
● Leases / licenses
● Expensive recomputes held in cache for extended periods of time
For these applications we need deterministic expiration
For other keys, we’re happy to allow Redis to evict them as necessary
to make room for more frequently used values
Redis wishlist
Expire individual fields in a hash map
● In Redis, only keys can be set to expire
● The entire hash map is evicted when the key expires
● Would be nice if individual fields in the hash map had time-to-live
Redis wishlist
field value
expiration
content-id hey-diddle-diddle TTL: 12 hours
likes 42 TTL: 5 minutes
related-content cat,fiddle,dish,spoon TTL: 1 hour
One approach:
cron jobs,
daemons,
schedulers, et al.
cron jobs, daemons, etc.
Use automated background tasks to monitor Redis
However:
● cron jobs may fail to run (or, worse, too many run at same time)
● daemons can be tricky to write
● single points of failure / lack of failover
● dedicated hardware to run background jobs
If you’ve ever had a machine go down over the weekend and your cleanup tasks
stopped running, you know what I’m talking about
Another approach:
work stealing
Work stealing
Term & concept borrowed from multiprocessor/multithreaded computing
Basic idea:
● “Steal” spare cycles from worker pools (“mugging” or “recruiting”)
● Have recruited workers perform a small slice of work
● If unable to finish work, don’t sweat it—the next recruit will pick up where the
current one left off
That’s it—a very simple idea that turns out to be quite powerful.
What’s more, it works well with Redis.
Finding workers with spare cycles to steal
● Web server pools
● Task / job / priority queue workers
● Cache fetches (cache hits in particular)
Finding workers with spare cycles to steal
In general, look for
● A pool or group of workers constantly servicing requests…
● …where the worker code may have a “fast exit” (such as a
cache hit or a no-op or a “little work to do” signal)
Finding workers with spare cycles to steal
In our distributed cluster, we steal workers from a content directory service
The directory service is constantly accessed by our Web servers
If a page paint worker has a cache hit, it’s a candidate for recruiting
We only need to recruit ~ 0.3% of the candidate workers
to get all our background work completed
with workers to spare
Example #1: Volatile hash map fields
To go back to my wish for hash map with expiring fields, here’s how I might
implement it:
To store a value:
● In a Redis hash map, store fields + their values
● In a Redis sorted set, store the field names with an expiration time
Example #1: Volatile hash map fields
Set a value (“HSETEX”):
; start transaction
MULTI
; set hash field
HSET hash:user:1 <field-name> <value>
; add field name to sorted set (sorted by expiration)
ZADD zset:user:1 <time_t> <field-name>
; commit transaction
EXEC
Example #1: Volatile hash map fields
To read a value:
● Reading value from hash map and read the expiration time from the sorted set
● If the field has expired, return to the caller NULL, Undefined, etc.
Example #1: Volatile hash map fields
Get a value:
; start transaction
MULTI
; get hash field
<value> = HGET hash:user:1 <field-name>
; get field’s expiration time
<expiration> = ZSCORE zset:user:1 <field-name>
; commit transaction
EXEC
Example #1: Volatile hash map fields
When are the expired fields deleted?
Think about those “30+ million content identifiers” mentioned earlier—
If a user accesses a piece of content once and never asks for it again…
… the client code never has a chance to delete expired hash fields.
It will remain stored in Redis permanently,
wasting memory that could be used for “active” records.
Example #1: Volatile hash map fields
field value
expiration
content-id hey-diddle-diddle TTL: 12 hours
likes 42 TTL: 5 minutes
related-content cat,fiddle,dish,spoon TTL: 1 hour
Example #1: Volatile hash map fields
To expire those fields in the background:
● A worker is “recruited” from the Web pool when it gets a cache hit
● The recruit randomly selects a single hash map
● It reads the sorted set to determine which fields have expired
● It deletes from the hash map those fields
Example #1: Volatile hash map fields
Work stealing allows for garbage collection
to occur “in the background” without
creating specialized scripts or bots
that may fail or not run often enough
to keep up with demand
Example #1: Volatile hash map fields
hash map (hash:user:1)
sorted set (zset:user:1)
content-id hey-diddle-diddle
likes 42
related spoon,dish,fork
last-referrer /details/spoon
related 9:05am
likes 10:00am
last-referrer 9:00pm
Example #1: Volatile hash map fields
Background expiration (work stealing):
WATCH hash:user:1 zset:user:1
; read five oldest hash fields which have expired
<expired-fields> = ZRANGEBYSCORE zset:user:1 -inf time() LIMIT 0 5
; start transaction
MULTI
; delete expired hash fields
HDEL hash:user:1 <expired-fields>
; remove fields from sorted set of expiration times
ZREM zset:user:1 <expired-fields>
; commit transaction or abort if hash:user:1 or zset:user:1 modified
EXEC
Things to notice
WATCH is used to prevent modifying the hash map or sorted set
if another writer modifies the tables
WATCH hash:user:1 zset:user:1
WATCH will cause the EXEC command to abort
if either of the above keys have been modified
Work stealing: things to notice
Any failure or outlying condition is ignored:
● hash map is empty
● no fields have expired
● failure to connect to server
● network error
● WATCH triggers an abort
● fail to acquire a distributed lock
The whole idea with work stealing is to “steal” slivers of spare cycles from workers
If there’s an error, don’t retry—give up and let the next recruit make an attempt
Work stealing: things to notice
Only a small amount of work is done in any stolen cycle:
ZRANGEBYSCORE zset:user:1 -inf time() LIMIT 0 5
Although this could be coded to fetch all expired fields, instead only the five (5)
oldest fields are retrieved
A large number of workers,
each performing a small amount of work,
means a lot can be done in aggregate
Example #2: Task queue follower
At Internet Archive, we have a custom task queuing system
that performs all content transformations and mutations
Some subsystems need to know quickly
if a particular content object has work queued or running
(We have 30+ million content identifiers,
but only a small percentage of them
are being worked on at any one time)
Example #2: Task queue follower
We use Redis to track when a content identifier has queued tasks
with two work stealing jobs
The first adds content identifiers by walking the database table and
adding identifiers to a Redis set
(Again, each Redis worker is only responsible for adding a small
number of tasks to Redis: 50 rows at most)
Example #2: Task queue follower
The other work stealing job is to remove content identifiers when
they no longer have work queued
Randomly samples a small number of content identifiers in the Redis
set and queries the database to see if the identifier still has any tasks
queued
Any content identifiers with no queued work is removed from the
Redis set
Example #2: Task queue follower
WATCH set:tasks:queued
; sample 5 content identifiers
<ids> = SRANDMEMBER set:tasks:queued 5
<quiesced> = <database query asking which of hose 5 have no pending tasks>
; start transaction
MULTI
; remove all with no pending work
SREM set:tasks:queued <quiesced>
; commit transaction or abort if set:tasks:queued was modified
EXEC
Writing work stealing routines for Redis
● Use WATCH and transactions to abort when other writers modify
tables
● Random sampling is your friend
● Log failures and outlying conditions…
● …but don’t retry, just exit and let the next worker make an attempt
● Don’t retry locks either, let the next worker make the attempt
● Each recruited worker performs only a small slice of work
“Wait—are you
saying all my workers
should be doing this
extra work?”
Recruiting workers (“mugging”) for work stealing
The approach I like (and has worked well for us):
#1: Workers are “enlisted” if they fast-exit in a particular bit of work:
● get a cache hit
● paint a simple Web page
● don’t need to query database
● etc.
Recruiting workers (“mugging”) for work stealing
The approach I like (and has worked well for us):
#2: Each work stealing job declares a rate—a percentage of enlisted
workers it needs for its work
● For example, 0.001 to receive 0.1% of the enlisted workers
● If you have more traffic, use a lower job rate
Recruiting workers (“mugging”) for work stealing
The approach I like (and has worked well for us):
#3: Each recruited worker generates a random number
● If that number if below the job’s rate, the enlistee is “recruited” and performs a
little bit of work
● Otherwise, the enlistee is dismissed—no extra work needs to be done at this
time
Recruiting workers (pseudo-code)
method enlist() {
rand = Random::float(); // from 0.0 to 1.0
target = 0.0;
foreach (self.registered_jobs as job) {
target += job.rate;
if (rand <= target)
return job.perform();
}
}
Recruiting workers
It’s deceptively simple
It works surprisingly well
It requires no extra state (tracking the number of workers,
distributed locks, job queues, etc.)
We’re doing this in production right now
Recruiting workers
One caveat:
Instrument your code!
(StatsD, Prometheus, etc.)
It’s important to know
● How many workers are selected for background work
● How many finish their work, how many stop due to errors/aborts
● Fine-tune your job rates (percentages) so enough workers are being recruited
“Show me the code.”
https://github.com/internetarchive/work-stealing
PRESENTED BY
Questions?
Thank you!
PRESENTED BY

More Related Content

What's hot

MongoDB: Comparing WiredTiger In-Memory Engine to Redis
MongoDB: Comparing WiredTiger In-Memory Engine to RedisMongoDB: Comparing WiredTiger In-Memory Engine to Redis
MongoDB: Comparing WiredTiger In-Memory Engine to Redis
Jason Terpko
 
A Fast and Efficient Time Series Storage Based on Apache Solr
A Fast and Efficient Time Series Storage Based on Apache SolrA Fast and Efficient Time Series Storage Based on Apache Solr
A Fast and Efficient Time Series Storage Based on Apache Solr
QAware GmbH
 
The new time series kid on the block
The new time series kid on the blockThe new time series kid on the block
The new time series kid on the block
Florian Lautenschlager
 
Chronix Poster for the Poster Session FAST 2017
Chronix Poster for the Poster Session FAST 2017Chronix Poster for the Poster Session FAST 2017
Chronix Poster for the Poster Session FAST 2017
Florian Lautenschlager
 
Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...
Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...
Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...
Lucidworks
 
Tag based sharding presentation
Tag based sharding presentationTag based sharding presentation
Tag based sharding presentation
Juan Antonio Roy Couto
 
OpenTSDB 2.0
OpenTSDB 2.0OpenTSDB 2.0
OpenTSDB 2.0
HBaseCon
 
Kerberizing spark. Spark Summit east
Kerberizing spark. Spark Summit eastKerberizing spark. Spark Summit east
Kerberizing spark. Spark Summit east
Jorge Lopez-Malla
 
Triggers In MongoDB
Triggers In MongoDBTriggers In MongoDB
Triggers In MongoDB
Jason Terpko
 
Update on OpenTSDB and AsyncHBase
Update on OpenTSDB and AsyncHBase Update on OpenTSDB and AsyncHBase
Update on OpenTSDB and AsyncHBase
HBaseCon
 
Managing Data and Operation Distribution In MongoDB
Managing Data and Operation Distribution In MongoDBManaging Data and Operation Distribution In MongoDB
Managing Data and Operation Distribution In MongoDB
Jason Terpko
 
Druid realtime indexing
Druid realtime indexingDruid realtime indexing
Druid realtime indexing
Seoeun Park
 
MongoDB Concepts
MongoDB ConceptsMongoDB Concepts
MongoDB Concepts
Juan Antonio Roy Couto
 
Apache Solr as a compressed, scalable, and high performance time series database
Apache Solr as a compressed, scalable, and high performance time series databaseApache Solr as a compressed, scalable, and high performance time series database
Apache Solr as a compressed, scalable, and high performance time series database
Florian Lautenschlager
 
MongoDB Basics Unileon
MongoDB Basics UnileonMongoDB Basics Unileon
MongoDB Basics Unileon
Juan Antonio Roy Couto
 
Introduction to redis - version 2
Introduction to redis - version 2Introduction to redis - version 2
Introduction to redis - version 2
Dvir Volk
 
openTSDB - Metrics for a distributed world
openTSDB - Metrics for a distributed worldopenTSDB - Metrics for a distributed world
openTSDB - Metrics for a distributed world
Oliver Hankeln
 
OpenTSDB: HBaseCon2017
OpenTSDB: HBaseCon2017OpenTSDB: HBaseCon2017
OpenTSDB: HBaseCon2017
HBaseCon
 
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Hernan Costante
 
RedisConf18 - Redis and Elasticsearch
RedisConf18 - Redis and ElasticsearchRedisConf18 - Redis and Elasticsearch
RedisConf18 - Redis and Elasticsearch
Redis Labs
 

What's hot (20)

MongoDB: Comparing WiredTiger In-Memory Engine to Redis
MongoDB: Comparing WiredTiger In-Memory Engine to RedisMongoDB: Comparing WiredTiger In-Memory Engine to Redis
MongoDB: Comparing WiredTiger In-Memory Engine to Redis
 
A Fast and Efficient Time Series Storage Based on Apache Solr
A Fast and Efficient Time Series Storage Based on Apache SolrA Fast and Efficient Time Series Storage Based on Apache Solr
A Fast and Efficient Time Series Storage Based on Apache Solr
 
The new time series kid on the block
The new time series kid on the blockThe new time series kid on the block
The new time series kid on the block
 
Chronix Poster for the Poster Session FAST 2017
Chronix Poster for the Poster Session FAST 2017Chronix Poster for the Poster Session FAST 2017
Chronix Poster for the Poster Session FAST 2017
 
Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...
Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...
Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...
 
Tag based sharding presentation
Tag based sharding presentationTag based sharding presentation
Tag based sharding presentation
 
OpenTSDB 2.0
OpenTSDB 2.0OpenTSDB 2.0
OpenTSDB 2.0
 
Kerberizing spark. Spark Summit east
Kerberizing spark. Spark Summit eastKerberizing spark. Spark Summit east
Kerberizing spark. Spark Summit east
 
Triggers In MongoDB
Triggers In MongoDBTriggers In MongoDB
Triggers In MongoDB
 
Update on OpenTSDB and AsyncHBase
Update on OpenTSDB and AsyncHBase Update on OpenTSDB and AsyncHBase
Update on OpenTSDB and AsyncHBase
 
Managing Data and Operation Distribution In MongoDB
Managing Data and Operation Distribution In MongoDBManaging Data and Operation Distribution In MongoDB
Managing Data and Operation Distribution In MongoDB
 
Druid realtime indexing
Druid realtime indexingDruid realtime indexing
Druid realtime indexing
 
MongoDB Concepts
MongoDB ConceptsMongoDB Concepts
MongoDB Concepts
 
Apache Solr as a compressed, scalable, and high performance time series database
Apache Solr as a compressed, scalable, and high performance time series databaseApache Solr as a compressed, scalable, and high performance time series database
Apache Solr as a compressed, scalable, and high performance time series database
 
MongoDB Basics Unileon
MongoDB Basics UnileonMongoDB Basics Unileon
MongoDB Basics Unileon
 
Introduction to redis - version 2
Introduction to redis - version 2Introduction to redis - version 2
Introduction to redis - version 2
 
openTSDB - Metrics for a distributed world
openTSDB - Metrics for a distributed worldopenTSDB - Metrics for a distributed world
openTSDB - Metrics for a distributed world
 
OpenTSDB: HBaseCon2017
OpenTSDB: HBaseCon2017OpenTSDB: HBaseCon2017
OpenTSDB: HBaseCon2017
 
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
 
RedisConf18 - Redis and Elasticsearch
RedisConf18 - Redis and ElasticsearchRedisConf18 - Redis and Elasticsearch
RedisConf18 - Redis and Elasticsearch
 

Similar to Work Stealing For Fun & Profit: Jim Nelson

Redis
RedisRedis
Extend Redis with Modules
Extend Redis with ModulesExtend Redis with Modules
Extend Redis with Modules
Itamar Haber
 
Developing a Redis Module - Hackathon Kickoff
 Developing a Redis Module - Hackathon Kickoff Developing a Redis Module - Hackathon Kickoff
Developing a Redis Module - Hackathon Kickoff
Itamar Haber
 
Redis Use Patterns (DevconTLV June 2014)
Redis Use Patterns (DevconTLV June 2014)Redis Use Patterns (DevconTLV June 2014)
Redis Use Patterns (DevconTLV June 2014)
Itamar Haber
 
Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with Redis
Ricard Clau
 
5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB
Tim Callaghan
 
RedisConf17 - Internet Archive - Preventing Cache Stampede with Redis and XFetch
RedisConf17 - Internet Archive - Preventing Cache Stampede with Redis and XFetchRedisConf17 - Internet Archive - Preventing Cache Stampede with Redis and XFetch
RedisConf17 - Internet Archive - Preventing Cache Stampede with Redis and XFetch
Redis Labs
 
10 Ways to Scale Your Website Silicon Valley Code Camp 2019
10 Ways to Scale Your Website Silicon Valley Code Camp 201910 Ways to Scale Your Website Silicon Valley Code Camp 2019
10 Ways to Scale Your Website Silicon Valley Code Camp 2019
Dave Nielsen
 
Redis Streams - Fiverr Tech5 meetup
Redis Streams - Fiverr Tech5 meetupRedis Streams - Fiverr Tech5 meetup
Redis Streams - Fiverr Tech5 meetup
Itamar Haber
 
Overview of data analytics service: Treasure Data Service
Overview of data analytics service: Treasure Data ServiceOverview of data analytics service: Treasure Data Service
Overview of data analytics service: Treasure Data Service
SATOSHI TAGOMORI
 
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)
Maarten Balliauw
 
OSDC 2016 - Chronix - A fast and efficient time series storage based on Apach...
OSDC 2016 - Chronix - A fast and efficient time series storage based on Apach...OSDC 2016 - Chronix - A fast and efficient time series storage based on Apach...
OSDC 2016 - Chronix - A fast and efficient time series storage based on Apach...
NETWAYS
 
Chronix: A fast and efficient time series storage based on Apache Solr
Chronix: A fast and efficient time series storage based on Apache SolrChronix: A fast and efficient time series storage based on Apache Solr
Chronix: A fast and efficient time series storage based on Apache Solr
Florian Lautenschlager
 
DSD-INT 2017 The use of big data for dredging - De Boer
DSD-INT 2017 The use of big data for dredging - De BoerDSD-INT 2017 The use of big data for dredging - De Boer
DSD-INT 2017 The use of big data for dredging - De Boer
Deltares
 
Lightning Talk: MATH is Hard : TTL Index Configuration and Considerations
Lightning Talk: MATH is Hard : TTL Index Configuration and ConsiderationsLightning Talk: MATH is Hard : TTL Index Configuration and Considerations
Lightning Talk: MATH is Hard : TTL Index Configuration and ConsiderationsMongoDB
 
Redis Installation Configuration And Implementation
Redis Installation Configuration And ImplementationRedis Installation Configuration And Implementation
Redis Installation Configuration And Implementation
Abhijeet Shekhar
 
Chronix Time Series Database - The New Time Series Kid on the Block
Chronix Time Series Database - The New Time Series Kid on the BlockChronix Time Series Database - The New Time Series Kid on the Block
Chronix Time Series Database - The New Time Series Kid on the Block
QAware GmbH
 
Paris Redis Meetup Introduction
Paris Redis Meetup IntroductionParis Redis Meetup Introduction
Paris Redis Meetup Introduction
Gregory Boissinot
 
Fast Data at Scale - AWS Summit Tel Aviv 2017
Fast Data at Scale - AWS Summit Tel Aviv 2017Fast Data at Scale - AWS Summit Tel Aviv 2017
Fast Data at Scale - AWS Summit Tel Aviv 2017
Amazon Web Services
 
Day 7 - Make it Fast
Day 7 - Make it FastDay 7 - Make it Fast
Day 7 - Make it Fast
Barry Jones
 

Similar to Work Stealing For Fun & Profit: Jim Nelson (20)

Redis
RedisRedis
Redis
 
Extend Redis with Modules
Extend Redis with ModulesExtend Redis with Modules
Extend Redis with Modules
 
Developing a Redis Module - Hackathon Kickoff
 Developing a Redis Module - Hackathon Kickoff Developing a Redis Module - Hackathon Kickoff
Developing a Redis Module - Hackathon Kickoff
 
Redis Use Patterns (DevconTLV June 2014)
Redis Use Patterns (DevconTLV June 2014)Redis Use Patterns (DevconTLV June 2014)
Redis Use Patterns (DevconTLV June 2014)
 
Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with Redis
 
5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB
 
RedisConf17 - Internet Archive - Preventing Cache Stampede with Redis and XFetch
RedisConf17 - Internet Archive - Preventing Cache Stampede with Redis and XFetchRedisConf17 - Internet Archive - Preventing Cache Stampede with Redis and XFetch
RedisConf17 - Internet Archive - Preventing Cache Stampede with Redis and XFetch
 
10 Ways to Scale Your Website Silicon Valley Code Camp 2019
10 Ways to Scale Your Website Silicon Valley Code Camp 201910 Ways to Scale Your Website Silicon Valley Code Camp 2019
10 Ways to Scale Your Website Silicon Valley Code Camp 2019
 
Redis Streams - Fiverr Tech5 meetup
Redis Streams - Fiverr Tech5 meetupRedis Streams - Fiverr Tech5 meetup
Redis Streams - Fiverr Tech5 meetup
 
Overview of data analytics service: Treasure Data Service
Overview of data analytics service: Treasure Data ServiceOverview of data analytics service: Treasure Data Service
Overview of data analytics service: Treasure Data Service
 
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)
 
OSDC 2016 - Chronix - A fast and efficient time series storage based on Apach...
OSDC 2016 - Chronix - A fast and efficient time series storage based on Apach...OSDC 2016 - Chronix - A fast and efficient time series storage based on Apach...
OSDC 2016 - Chronix - A fast and efficient time series storage based on Apach...
 
Chronix: A fast and efficient time series storage based on Apache Solr
Chronix: A fast and efficient time series storage based on Apache SolrChronix: A fast and efficient time series storage based on Apache Solr
Chronix: A fast and efficient time series storage based on Apache Solr
 
DSD-INT 2017 The use of big data for dredging - De Boer
DSD-INT 2017 The use of big data for dredging - De BoerDSD-INT 2017 The use of big data for dredging - De Boer
DSD-INT 2017 The use of big data for dredging - De Boer
 
Lightning Talk: MATH is Hard : TTL Index Configuration and Considerations
Lightning Talk: MATH is Hard : TTL Index Configuration and ConsiderationsLightning Talk: MATH is Hard : TTL Index Configuration and Considerations
Lightning Talk: MATH is Hard : TTL Index Configuration and Considerations
 
Redis Installation Configuration And Implementation
Redis Installation Configuration And ImplementationRedis Installation Configuration And Implementation
Redis Installation Configuration And Implementation
 
Chronix Time Series Database - The New Time Series Kid on the Block
Chronix Time Series Database - The New Time Series Kid on the BlockChronix Time Series Database - The New Time Series Kid on the Block
Chronix Time Series Database - The New Time Series Kid on the Block
 
Paris Redis Meetup Introduction
Paris Redis Meetup IntroductionParis Redis Meetup Introduction
Paris Redis Meetup Introduction
 
Fast Data at Scale - AWS Summit Tel Aviv 2017
Fast Data at Scale - AWS Summit Tel Aviv 2017Fast Data at Scale - AWS Summit Tel Aviv 2017
Fast Data at Scale - AWS Summit Tel Aviv 2017
 
Day 7 - Make it Fast
Day 7 - Make it FastDay 7 - Make it Fast
Day 7 - Make it Fast
 

More from Redis Labs

Redis Day Bangalore 2020 - Session state caching with redis
Redis Day Bangalore 2020 - Session state caching with redisRedis Day Bangalore 2020 - Session state caching with redis
Redis Day Bangalore 2020 - Session state caching with redis
Redis Labs
 
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
Redis Labs
 
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
Redis Labs
 
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
Redis Labs
 
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Redis Labs
 
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
Redis for Data Science and Engineering by Dmitry Polyakovsky of OracleRedis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
Redis Labs
 
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
Redis Labs
 
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Redis Labs
 
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
Redis Labs
 
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
Redis Labs
 
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
Redis Labs
 
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Redis Labs
 
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
Redis Labs
 
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
Redis Labs
 
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
Redis Labs
 
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
Redis Labs
 
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
Redis Labs
 
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
Redis Labs
 
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
Redis Labs
 
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
Redis Labs
 

More from Redis Labs (20)

Redis Day Bangalore 2020 - Session state caching with redis
Redis Day Bangalore 2020 - Session state caching with redisRedis Day Bangalore 2020 - Session state caching with redis
Redis Day Bangalore 2020 - Session state caching with redis
 
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
 
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
 
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
 
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
 
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
Redis for Data Science and Engineering by Dmitry Polyakovsky of OracleRedis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
 
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
 
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
 
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
 
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
 
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
 
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
 
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
 
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
 
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
 
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
 
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
 
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
 
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
 
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
 

Recently uploaded

Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 

Recently uploaded (20)

Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 

Work Stealing For Fun & Profit: Jim Nelson

  • 1. PRESENTED BY Work stealing for fun & profit: Making Redis do things you thought it couldn't do Jim Nelson Internet Archive, Cluster Operations Engineer
  • 2. Internet Archive / archive.org Universal Access to All Knowledge ● Nonprofit, founded 1996, based in San Francisco ● Archive of digital and physical media ● Includes Web, books, music, film, software & more ● One million visitors per day ● 22+ years of the Web archived for replay: 300 billion pages ● 30+ million media items Over 45 petabytes of unique data stored on a bespoke archival-centric computing cluster located in San Francisco & Richmond
  • 3. Internet Archive ♡ Redis ● IA metadata directory service backed by 10-node sharded Redis cluster ● Sharding performed client-side via consistent hashing (PHP, Predis) ● Each node supported by two replicated mirrors (fail-over) ● Specialized Redis instances also used throughout IA’s services, including ○ Wayback Machine ○ Search (item metadata and full-text) ○ Administrative & usage tracking ○ …and more
  • 4. Before we get started ● I’m assuming you’ve written Redis client code already ● You don’t need to know the exact details of the Redis protocol… ● …but you need some understanding of how Redis “works” ○ single-threaded ○ different data types (strings, hash, sorted sets, etc.) ○ Basic commands (GET, SET, HGET, etc.) ○ transactions (MULTI/EXEC)
  • 5. Some things I wish Redis could do it cannot do today
  • 6. Redis wishlist Expire keys only after their time-to-live passes ● Redis may evict volatile keys at any time when under memory pressure (MAXMEMORY policy) ● EXPIRE marks the key as “volatile” ● If Redis runs out of memory, random volatile keys are freed
  • 7. Redis wishlist Expire keys only after their time-to-live passes There are some situations where it’s not merely important, but vital the key remains available until the time-to-live expires (locks, expensive recomputes, leases, etc.)
  • 8. Redis wishlist ● Our Redis cluster is constantly under memory pressure ● In heavy load, up to 1,000 keys / minute are evicted ● 30+ million media items means 30+ million content identifiers ● All of their metadata are competing for precious bytes on our Redis cluster
  • 9. Redis wishlist Deterministic expiration Examples of keys with important TTLs: ● Distributed locks (Redlock, etc.) ● Leases / licenses ● Expensive recomputes held in cache for extended periods of time For these applications we need deterministic expiration For other keys, we’re happy to allow Redis to evict them as necessary to make room for more frequently used values
  • 10. Redis wishlist Expire individual fields in a hash map ● In Redis, only keys can be set to expire ● The entire hash map is evicted when the key expires ● Would be nice if individual fields in the hash map had time-to-live
  • 11. Redis wishlist field value expiration content-id hey-diddle-diddle TTL: 12 hours likes 42 TTL: 5 minutes related-content cat,fiddle,dish,spoon TTL: 1 hour
  • 13. cron jobs, daemons, etc. Use automated background tasks to monitor Redis However: ● cron jobs may fail to run (or, worse, too many run at same time) ● daemons can be tricky to write ● single points of failure / lack of failover ● dedicated hardware to run background jobs If you’ve ever had a machine go down over the weekend and your cleanup tasks stopped running, you know what I’m talking about
  • 15. Work stealing Term & concept borrowed from multiprocessor/multithreaded computing Basic idea: ● “Steal” spare cycles from worker pools (“mugging” or “recruiting”) ● Have recruited workers perform a small slice of work ● If unable to finish work, don’t sweat it—the next recruit will pick up where the current one left off That’s it—a very simple idea that turns out to be quite powerful. What’s more, it works well with Redis.
  • 16. Finding workers with spare cycles to steal ● Web server pools ● Task / job / priority queue workers ● Cache fetches (cache hits in particular)
  • 17. Finding workers with spare cycles to steal In general, look for ● A pool or group of workers constantly servicing requests… ● …where the worker code may have a “fast exit” (such as a cache hit or a no-op or a “little work to do” signal)
  • 18. Finding workers with spare cycles to steal In our distributed cluster, we steal workers from a content directory service The directory service is constantly accessed by our Web servers If a page paint worker has a cache hit, it’s a candidate for recruiting We only need to recruit ~ 0.3% of the candidate workers to get all our background work completed with workers to spare
  • 19. Example #1: Volatile hash map fields To go back to my wish for hash map with expiring fields, here’s how I might implement it: To store a value: ● In a Redis hash map, store fields + their values ● In a Redis sorted set, store the field names with an expiration time
  • 20. Example #1: Volatile hash map fields Set a value (“HSETEX”): ; start transaction MULTI ; set hash field HSET hash:user:1 <field-name> <value> ; add field name to sorted set (sorted by expiration) ZADD zset:user:1 <time_t> <field-name> ; commit transaction EXEC
  • 21. Example #1: Volatile hash map fields To read a value: ● Reading value from hash map and read the expiration time from the sorted set ● If the field has expired, return to the caller NULL, Undefined, etc.
  • 22. Example #1: Volatile hash map fields Get a value: ; start transaction MULTI ; get hash field <value> = HGET hash:user:1 <field-name> ; get field’s expiration time <expiration> = ZSCORE zset:user:1 <field-name> ; commit transaction EXEC
  • 23. Example #1: Volatile hash map fields When are the expired fields deleted? Think about those “30+ million content identifiers” mentioned earlier— If a user accesses a piece of content once and never asks for it again… … the client code never has a chance to delete expired hash fields. It will remain stored in Redis permanently, wasting memory that could be used for “active” records.
  • 24. Example #1: Volatile hash map fields field value expiration content-id hey-diddle-diddle TTL: 12 hours likes 42 TTL: 5 minutes related-content cat,fiddle,dish,spoon TTL: 1 hour
  • 25. Example #1: Volatile hash map fields To expire those fields in the background: ● A worker is “recruited” from the Web pool when it gets a cache hit ● The recruit randomly selects a single hash map ● It reads the sorted set to determine which fields have expired ● It deletes from the hash map those fields
  • 26. Example #1: Volatile hash map fields Work stealing allows for garbage collection to occur “in the background” without creating specialized scripts or bots that may fail or not run often enough to keep up with demand
  • 27. Example #1: Volatile hash map fields hash map (hash:user:1) sorted set (zset:user:1) content-id hey-diddle-diddle likes 42 related spoon,dish,fork last-referrer /details/spoon related 9:05am likes 10:00am last-referrer 9:00pm
  • 28. Example #1: Volatile hash map fields Background expiration (work stealing): WATCH hash:user:1 zset:user:1 ; read five oldest hash fields which have expired <expired-fields> = ZRANGEBYSCORE zset:user:1 -inf time() LIMIT 0 5 ; start transaction MULTI ; delete expired hash fields HDEL hash:user:1 <expired-fields> ; remove fields from sorted set of expiration times ZREM zset:user:1 <expired-fields> ; commit transaction or abort if hash:user:1 or zset:user:1 modified EXEC
  • 29. Things to notice WATCH is used to prevent modifying the hash map or sorted set if another writer modifies the tables WATCH hash:user:1 zset:user:1 WATCH will cause the EXEC command to abort if either of the above keys have been modified
  • 30. Work stealing: things to notice Any failure or outlying condition is ignored: ● hash map is empty ● no fields have expired ● failure to connect to server ● network error ● WATCH triggers an abort ● fail to acquire a distributed lock The whole idea with work stealing is to “steal” slivers of spare cycles from workers If there’s an error, don’t retry—give up and let the next recruit make an attempt
  • 31. Work stealing: things to notice Only a small amount of work is done in any stolen cycle: ZRANGEBYSCORE zset:user:1 -inf time() LIMIT 0 5 Although this could be coded to fetch all expired fields, instead only the five (5) oldest fields are retrieved A large number of workers, each performing a small amount of work, means a lot can be done in aggregate
  • 32.
  • 33. Example #2: Task queue follower At Internet Archive, we have a custom task queuing system that performs all content transformations and mutations Some subsystems need to know quickly if a particular content object has work queued or running (We have 30+ million content identifiers, but only a small percentage of them are being worked on at any one time)
  • 34. Example #2: Task queue follower We use Redis to track when a content identifier has queued tasks with two work stealing jobs The first adds content identifiers by walking the database table and adding identifiers to a Redis set (Again, each Redis worker is only responsible for adding a small number of tasks to Redis: 50 rows at most)
  • 35. Example #2: Task queue follower The other work stealing job is to remove content identifiers when they no longer have work queued Randomly samples a small number of content identifiers in the Redis set and queries the database to see if the identifier still has any tasks queued Any content identifiers with no queued work is removed from the Redis set
  • 36. Example #2: Task queue follower WATCH set:tasks:queued ; sample 5 content identifiers <ids> = SRANDMEMBER set:tasks:queued 5 <quiesced> = <database query asking which of hose 5 have no pending tasks> ; start transaction MULTI ; remove all with no pending work SREM set:tasks:queued <quiesced> ; commit transaction or abort if set:tasks:queued was modified EXEC
  • 37. Writing work stealing routines for Redis ● Use WATCH and transactions to abort when other writers modify tables ● Random sampling is your friend ● Log failures and outlying conditions… ● …but don’t retry, just exit and let the next worker make an attempt ● Don’t retry locks either, let the next worker make the attempt ● Each recruited worker performs only a small slice of work
  • 38. “Wait—are you saying all my workers should be doing this extra work?”
  • 39. Recruiting workers (“mugging”) for work stealing The approach I like (and has worked well for us): #1: Workers are “enlisted” if they fast-exit in a particular bit of work: ● get a cache hit ● paint a simple Web page ● don’t need to query database ● etc.
  • 40. Recruiting workers (“mugging”) for work stealing The approach I like (and has worked well for us): #2: Each work stealing job declares a rate—a percentage of enlisted workers it needs for its work ● For example, 0.001 to receive 0.1% of the enlisted workers ● If you have more traffic, use a lower job rate
  • 41. Recruiting workers (“mugging”) for work stealing The approach I like (and has worked well for us): #3: Each recruited worker generates a random number ● If that number if below the job’s rate, the enlistee is “recruited” and performs a little bit of work ● Otherwise, the enlistee is dismissed—no extra work needs to be done at this time
  • 42. Recruiting workers (pseudo-code) method enlist() { rand = Random::float(); // from 0.0 to 1.0 target = 0.0; foreach (self.registered_jobs as job) { target += job.rate; if (rand <= target) return job.perform(); } }
  • 43. Recruiting workers It’s deceptively simple It works surprisingly well It requires no extra state (tracking the number of workers, distributed locks, job queues, etc.) We’re doing this in production right now
  • 44. Recruiting workers One caveat: Instrument your code! (StatsD, Prometheus, etc.) It’s important to know ● How many workers are selected for background work ● How many finish their work, how many stop due to errors/aborts ● Fine-tune your job rates (percentages) so enough workers are being recruited
  • 45. “Show me the code.” https://github.com/internetarchive/work-stealing