Counting image views using redis cluster

Redis Labs
Redis LabsRedis Labs
Counting Image Views using Redis Cluster
Seandon Mooy
DevOps Engineer
@erulabs
Counting Image Views using Redis Cluster
Or…. how I stopped map-reducing and learned to love the stream
Seandon Mooy
DevOps Engineer
@erulabs
Counting image views using redis cluster
Counting image views using redis cluster
Counting image views using redis cluster
3 Billion!
Counting image views using redis cluster
Delay!
Delay!
Failures!
Delay!
Failures!
Failures!
Also… I may not be the best zookeeper
Challenges with Hbase
Roughly 5% of all requests
through THRIFT were
failing… So many tunables!
Challenges with Hbase
Roughly 5% of all requests
through THRIFT were
failing… So many tunables!
Optimized timeouts,
added circuitbreakers, etc
Trickle of working requests
during outage means circuit
breakers are hard to design…
Challenges with Hbase
Roughly 5% of all requests
through THRIFT were
failing… So many tunables!
Optimized timeouts,
added circuitbreakers, etc
Trickle of working requests
during outage means circuit
breakers are hard to design…
“Hbase down == Imgur down”
Downtime == sadtime :(
3 Billion!
Solution?
Redis Cluster!
Fastly
ViewCount V2 - Real time with less complexity!
TCP syslog stream
Fastly
ViewCount V2 - Real time with less complexity!
TCP syslog stream
Ingest service
Fastly
ViewCount V2 - Real time with less complexity!
TCP syslog stream
Ingest service
Parses syslog lines, reports
metrics via statsd
Fastly
ViewCount V2 - Real time with less complexity!
TCP syslog stream
Ingest service
Parses syslog lines, reports
metrics via statsd
Redis 3.2 cluster!
Fastly
ViewCount V2 - Real time with less complexity!
Ingest service
Hbase Backfill service
Fastly
ViewCount V2 - Real time with less complexity!
Ingest service
Hbase Backfill service
Internet
API service
ViewCount V2 - Results:
ViewCount V2 - Results:
Request latency:
min: 1ms
max: 16.9ms
median: 1.6ms
p95: 2.6ms
p99: 4.6ms
Codes:
200: 10000
ViewCount V2 - Results:
Request latency:
min: 1ms
max: 16.9ms
median: 1.6ms
p95: 2.6ms
p99: 4.6ms
Codes:
200: 10000
ViewCount V2 - Results:
20 billion commands!
> 400GB in memory!
Things to be aware of:
1. Redis Cluster shard maps - redirections, etc.
Monitor redirections - gracefully restart workers after shard moves
2. AOF can slow down / fail large “redis-trib.rb” operations.
Make sure to disable before / re-enable after!
3. Not all legacy systems support Redis Cluster, and if they do…
They might not support it well (PHP-FPM)!
4. Over memory capacity behavior?
Previously we would hard-crash - now we’d LRU old 1-view images.
Neither are good, but for us, one is much less painful
ViewCount V3?
Approaching the point of minimal gains for man-hours, but what else might be fun?
1. Moving PHP7 off NodeJS API and directly to Redis Cluster
Downsides: dealing with shard maps is complex is a stateless / process-per-request environment!
2. Using redis3's BITFIELD or HSet to save on key storage costs
Downsides: complicate the system, reduce “hit-by-a-bus” issues - keys are just hashes, values are just counts!
3. Dealing with the nature of TCP Streams (TCP is not HTTP!)
One connection to rule them all! - Node’s Cluster module helps,
but perhaps Rust or Golang?
Downsides: Vertical scaling is non-obvious on EC2
ViewCount V2 - Results:
Redis is:
Faster - Imgur response time decreased ~50ms
ViewCount V2 - Results:
Redis is:
Faster - Imgur response time decreased ~50ms
Cheaper - EC2 cost reduced by 75%
ViewCount V2 - Results:
Redis is:
Faster - Imgur response time decreased ~50ms
Cheaper - EC2 cost reduced by 75%
Simpler - No Java, no MR, no ZK, no third parties, just INCR + GET!
Redis is:
Faster - Imgur response time decreased ~50ms
Cheaper - EC2 cost reduced by 75%
Simpler - No Java, no MR, no ZK, no third parties, just INCR + GET!
More fun! - I got to talk at RedisConf17!
ViewCount V2 - Results:
Acknowledgment
Imgur DevOps Team
Imgur Platform Team
1 of 33

Recommended

RedisConf17- Using Redis at scale @ Twitter by
RedisConf17- Using Redis at scale @ TwitterRedisConf17- Using Redis at scale @ Twitter
RedisConf17- Using Redis at scale @ TwitterRedis Labs
3.8K views26 slides
Troubleshooting redis by
Troubleshooting redisTroubleshooting redis
Troubleshooting redisDaeMyung Kang
2.6K views101 slides
Day 2 General Session Presentations RedisConf by
Day 2 General Session Presentations RedisConfDay 2 General Session Presentations RedisConf
Day 2 General Session Presentations RedisConfRedis Labs
885 views123 slides
RedisConf17 - Redis in High Traffic Adtech Stack by
RedisConf17 - Redis in High Traffic Adtech StackRedisConf17 - Redis in High Traffic Adtech Stack
RedisConf17 - Redis in High Traffic Adtech StackRedis Labs
1.5K views38 slides
Using Redis at Facebook by
Using Redis at FacebookUsing Redis at Facebook
Using Redis at FacebookRedis Labs
2.7K views11 slides
RedisConf17 - Lyft - Geospatial at Scale - Daniel Hochman by
RedisConf17 - Lyft - Geospatial at Scale - Daniel HochmanRedisConf17 - Lyft - Geospatial at Scale - Daniel Hochman
RedisConf17 - Lyft - Geospatial at Scale - Daniel HochmanRedis Labs
2.4K views26 slides

More Related Content

What's hot

Redis for horizontally scaled data processing at jFrog bintray by
Redis for horizontally scaled data processing at jFrog bintrayRedis for horizontally scaled data processing at jFrog bintray
Redis for horizontally scaled data processing at jFrog bintrayRedis Labs
687 views22 slides
Redis Day Keynote Salvatore Sanfillipo Redis Labs by
Redis Day Keynote Salvatore Sanfillipo Redis LabsRedis Day Keynote Salvatore Sanfillipo Redis Labs
Redis Day Keynote Salvatore Sanfillipo Redis LabsRedis Labs
987 views39 slides
Redis Developers Day 2014 - Redis Labs Talks by
Redis Developers Day 2014 - Redis Labs TalksRedis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs TalksRedis Labs
2.1K views16 slides
RedisConf17 - Redis Cluster at flickr and tripod by
RedisConf17 - Redis Cluster at flickr and tripodRedisConf17 - Redis Cluster at flickr and tripod
RedisConf17 - Redis Cluster at flickr and tripodRedis Labs
1.1K views14 slides
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More! by
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More! Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More!
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More! Redis Labs
4.5K views66 slides
Redis Replication by
Redis ReplicationRedis Replication
Redis ReplicationIsmaeel Enjreny
1.2K views10 slides

What's hot(20)

Redis for horizontally scaled data processing at jFrog bintray by Redis Labs
Redis for horizontally scaled data processing at jFrog bintrayRedis for horizontally scaled data processing at jFrog bintray
Redis for horizontally scaled data processing at jFrog bintray
Redis Labs687 views
Redis Day Keynote Salvatore Sanfillipo Redis Labs by Redis Labs
Redis Day Keynote Salvatore Sanfillipo Redis LabsRedis Day Keynote Salvatore Sanfillipo Redis Labs
Redis Day Keynote Salvatore Sanfillipo Redis Labs
Redis Labs987 views
Redis Developers Day 2014 - Redis Labs Talks by Redis Labs
Redis Developers Day 2014 - Redis Labs TalksRedis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs Talks
Redis Labs2.1K views
RedisConf17 - Redis Cluster at flickr and tripod by Redis Labs
RedisConf17 - Redis Cluster at flickr and tripodRedisConf17 - Redis Cluster at flickr and tripod
RedisConf17 - Redis Cluster at flickr and tripod
Redis Labs1.1K views
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More! by Redis Labs
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More! Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More!
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More!
Redis Labs4.5K views
Perforce BTrees: The Arcane and the Profane by Perforce
Perforce BTrees: The Arcane and the ProfanePerforce BTrees: The Arcane and the Profane
Perforce BTrees: The Arcane and the Profane
Perforce795 views
Managing Redis with Kubernetes - Kelsey Hightower, Google by Redis Labs
Managing Redis with Kubernetes - Kelsey Hightower, GoogleManaging Redis with Kubernetes - Kelsey Hightower, Google
Managing Redis with Kubernetes - Kelsey Hightower, Google
Redis Labs7.8K views
Managing 50K+ Redis Databases Over 4 Public Clouds ... with a Tiny Devops Team by Redis Labs
Managing 50K+ Redis Databases Over 4 Public Clouds ... with a Tiny Devops TeamManaging 50K+ Redis Databases Over 4 Public Clouds ... with a Tiny Devops Team
Managing 50K+ Redis Databases Over 4 Public Clouds ... with a Tiny Devops Team
Redis Labs28K views
Dynomite: A Highly Available, Distributed and Scalable Dynamo Layer--Ioannis ... by Redis Labs
Dynomite: A Highly Available, Distributed and Scalable Dynamo Layer--Ioannis ...Dynomite: A Highly Available, Distributed and Scalable Dynamo Layer--Ioannis ...
Dynomite: A Highly Available, Distributed and Scalable Dynamo Layer--Ioannis ...
Redis Labs3.9K views
RADOS improvements and roadmap - Greg Farnum, Josh Durgin, Kefu Chai by Ceph Community
RADOS improvements and roadmap - Greg Farnum, Josh Durgin, Kefu ChaiRADOS improvements and roadmap - Greg Farnum, Josh Durgin, Kefu Chai
RADOS improvements and roadmap - Greg Farnum, Josh Durgin, Kefu Chai
Ceph Community 93 views
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All by ScyllaDB
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them AllScylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
ScyllaDB690 views
Ceph Client librbd Performance Analysis and Learnings - Mahati Chamarthy by Ceph Community
Ceph Client librbd Performance Analysis and Learnings - Mahati ChamarthyCeph Client librbd Performance Analysis and Learnings - Mahati Chamarthy
Ceph Client librbd Performance Analysis and Learnings - Mahati Chamarthy
Ceph Community 141 views
Highly scalable caching service on cloud - Redis by Krishna-Kumar
Highly scalable caching service on cloud - RedisHighly scalable caching service on cloud - Redis
Highly scalable caching service on cloud - Redis
Krishna-Kumar 3.6K views
Leveraging Structured Data To Reduce Disk, IO & Network Bandwidth by Perforce
Leveraging Structured Data To Reduce Disk, IO & Network BandwidthLeveraging Structured Data To Reduce Disk, IO & Network Bandwidth
Leveraging Structured Data To Reduce Disk, IO & Network Bandwidth
Perforce299 views
Experiences building a distributed shared log on RADOS - Noah Watkins by Ceph Community
Experiences building a distributed shared log on RADOS - Noah WatkinsExperiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah Watkins
Ceph Community 98 views
Linux Block Cache Practice on Ceph BlueStore - Junxin Zhang by Ceph Community
Linux Block Cache Practice on Ceph BlueStore - Junxin ZhangLinux Block Cache Practice on Ceph BlueStore - Junxin Zhang
Linux Block Cache Practice on Ceph BlueStore - Junxin Zhang
Ceph Community 248 views
RedisConf17 - Redis Development, An Update - @antirez by Redis Labs
RedisConf17 - Redis Development, An Update - @antirezRedisConf17 - Redis Development, An Update - @antirez
RedisConf17 - Redis Development, An Update - @antirez
Redis Labs601 views
Ceph Goes on Online at Qihoo 360 - Xuehan Xu by Ceph Community
Ceph Goes on Online at Qihoo 360 - Xuehan XuCeph Goes on Online at Qihoo 360 - Xuehan Xu
Ceph Goes on Online at Qihoo 360 - Xuehan Xu
Ceph Community 83 views

Similar to Counting image views using redis cluster

Compressed Introduction to Hadoop, SQL-on-Hadoop and NoSQL by
Compressed Introduction to Hadoop, SQL-on-Hadoop and NoSQLCompressed Introduction to Hadoop, SQL-on-Hadoop and NoSQL
Compressed Introduction to Hadoop, SQL-on-Hadoop and NoSQLArseny Chernov
635 views42 slides
Infrastructure as code might be literally impossible part 2 by
Infrastructure as code might be literally impossible part 2Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2ice799
2.1K views230 slides
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram by
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagramMohit Jain
1K views185 slides
Scaling Instagram by
Scaling InstagramScaling Instagram
Scaling Instagramiammutex
189.4K views185 slides
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram by
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagramferreroroche11
1.3K views185 slides
PAC 2019 virtual Mark Tomlinson by
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonNeotys
188 views18 slides

Similar to Counting image views using redis cluster(20)

Compressed Introduction to Hadoop, SQL-on-Hadoop and NoSQL by Arseny Chernov
Compressed Introduction to Hadoop, SQL-on-Hadoop and NoSQLCompressed Introduction to Hadoop, SQL-on-Hadoop and NoSQL
Compressed Introduction to Hadoop, SQL-on-Hadoop and NoSQL
Arseny Chernov635 views
Infrastructure as code might be literally impossible part 2 by ice799
Infrastructure as code might be literally impossible part 2Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2
ice7992.1K views
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram by Mohit Jain
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram
Mohit Jain1K views
Scaling Instagram by iammutex
Scaling InstagramScaling Instagram
Scaling Instagram
iammutex189.4K views
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram by ferreroroche11
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram
ferreroroche111.3K views
PAC 2019 virtual Mark Tomlinson by Neotys
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark Tomlinson
Neotys188 views
Architectural Overview of MapR's Apache Hadoop Distribution by mcsrivas
Architectural Overview of MapR's Apache Hadoop DistributionArchitectural Overview of MapR's Apache Hadoop Distribution
Architectural Overview of MapR's Apache Hadoop Distribution
mcsrivas7.3K views
Php johannesburg meetup - talk 2014 - scaling php in the enterprise by Sarel van der Walt
Php johannesburg   meetup - talk 2014 - scaling php in the enterprisePhp johannesburg   meetup - talk 2014 - scaling php in the enterprise
Php johannesburg meetup - talk 2014 - scaling php in the enterprise
Sarel van der Walt845 views
10 Devops-Friendly Database Must-Haves - Dor Laor, ScyllaDB - DevOpsDays Tel ... by DevOpsDays Tel Aviv
10 Devops-Friendly Database Must-Haves - Dor Laor, ScyllaDB - DevOpsDays Tel ...10 Devops-Friendly Database Must-Haves - Dor Laor, ScyllaDB - DevOpsDays Tel ...
10 Devops-Friendly Database Must-Haves - Dor Laor, ScyllaDB - DevOpsDays Tel ...
Scaling with Symfony - PHP UK by Ricard Clau
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UK
Ricard Clau13K views
Concurrent Programming with Ruby and Tuple Spaces by luccastera
Concurrent Programming with Ruby and Tuple SpacesConcurrent Programming with Ruby and Tuple Spaces
Concurrent Programming with Ruby and Tuple Spaces
luccastera5.4K views
First Hive Meetup London 2012-07-10 - Tomas Cervenka - VisualDNA by Tomas Cervenka
First Hive Meetup London 2012-07-10 - Tomas Cervenka - VisualDNAFirst Hive Meetup London 2012-07-10 - Tomas Cervenka - VisualDNA
First Hive Meetup London 2012-07-10 - Tomas Cervenka - VisualDNA
Tomas Cervenka1.3K views
Knowledge share about scalable application architecture by AHM Pervej Kabir
Knowledge share about scalable application architectureKnowledge share about scalable application architecture
Knowledge share about scalable application architecture
AHM Pervej Kabir589 views
CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an... by Andrey Korolyov
CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...
CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...
Andrey Korolyov617 views
Considerations when implementing_ha_in_dmf by hik_lhz
Considerations when implementing_ha_in_dmfConsiderations when implementing_ha_in_dmf
Considerations when implementing_ha_in_dmf
hik_lhz599 views
Kiwipycon2011 async-with-gevent-redis by alexdong
Kiwipycon2011 async-with-gevent-redisKiwipycon2011 async-with-gevent-redis
Kiwipycon2011 async-with-gevent-redis
alexdong2.5K views
KubeCon EU 2016: Full Automatic Database: PostgreSQL HA with Kubernetes by KubeAcademy
KubeCon EU 2016: Full Automatic Database: PostgreSQL HA with KubernetesKubeCon EU 2016: Full Automatic Database: PostgreSQL HA with Kubernetes
KubeCon EU 2016: Full Automatic Database: PostgreSQL HA with Kubernetes
KubeAcademy1.9K views
Redis Everywhere - Sunshine PHP by Ricard Clau
Redis Everywhere - Sunshine PHPRedis Everywhere - Sunshine PHP
Redis Everywhere - Sunshine PHP
Ricard Clau22.5K views

More from Redis Labs

Redis Day Bangalore 2020 - Session state caching with redis by
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 redisRedis Labs
2.7K views12 slides
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020 by
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 2020Redis Labs
851 views23 slides
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da... by
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
1.8K views29 slides
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020 by
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 2020Redis Labs
412 views10 slides
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar... by
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
303 views14 slides
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle by
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 OracleRedis Labs
356 views14 slides

More from Redis Labs(20)

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

Recently uploaded

Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates by
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesKeynote Talk: Open Source is Not Dead - Charles Schulz - Vates
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesShapeBlue
252 views15 slides
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITShapeBlue
206 views8 slides
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...ShapeBlue
198 views20 slides
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... by
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...ShapeBlue
173 views15 slides
Business Analyst Series 2023 - Week 4 Session 8 by
Business Analyst Series 2023 -  Week 4 Session 8Business Analyst Series 2023 -  Week 4 Session 8
Business Analyst Series 2023 - Week 4 Session 8DianaGray10
123 views13 slides
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineShapeBlue
221 views19 slides

Recently uploaded(20)

Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates by ShapeBlue
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesKeynote Talk: Open Source is Not Dead - Charles Schulz - Vates
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates
ShapeBlue252 views
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue206 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue198 views
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... by ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue173 views
Business Analyst Series 2023 - Week 4 Session 8 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 8Business Analyst Series 2023 -  Week 4 Session 8
Business Analyst Series 2023 - Week 4 Session 8
DianaGray10123 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue221 views
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ by ShapeBlue
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericConfidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
ShapeBlue130 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue263 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc170 views
DRBD Deep Dive - Philipp Reisner - LINBIT by ShapeBlue
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBIT
ShapeBlue180 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue203 views
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... by ShapeBlue
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
ShapeBlue106 views
Initiating and Advancing Your Strategic GIS Governance Strategy by Safe Software
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software176 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue166 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue180 views
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue218 views
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty64 views

Counting image views using redis cluster

  • 1. Counting Image Views using Redis Cluster Seandon Mooy DevOps Engineer @erulabs
  • 2. Counting Image Views using Redis Cluster Or…. how I stopped map-reducing and learned to love the stream Seandon Mooy DevOps Engineer @erulabs
  • 11. Also… I may not be the best zookeeper
  • 12. Challenges with Hbase Roughly 5% of all requests through THRIFT were failing… So many tunables!
  • 13. Challenges with Hbase Roughly 5% of all requests through THRIFT were failing… So many tunables! Optimized timeouts, added circuitbreakers, etc Trickle of working requests during outage means circuit breakers are hard to design…
  • 14. Challenges with Hbase Roughly 5% of all requests through THRIFT were failing… So many tunables! Optimized timeouts, added circuitbreakers, etc Trickle of working requests during outage means circuit breakers are hard to design… “Hbase down == Imgur down” Downtime == sadtime :(
  • 17. Fastly ViewCount V2 - Real time with less complexity! TCP syslog stream
  • 18. Fastly ViewCount V2 - Real time with less complexity! TCP syslog stream Ingest service
  • 19. Fastly ViewCount V2 - Real time with less complexity! TCP syslog stream Ingest service Parses syslog lines, reports metrics via statsd
  • 20. Fastly ViewCount V2 - Real time with less complexity! TCP syslog stream Ingest service Parses syslog lines, reports metrics via statsd Redis 3.2 cluster!
  • 21. Fastly ViewCount V2 - Real time with less complexity! Ingest service Hbase Backfill service
  • 22. Fastly ViewCount V2 - Real time with less complexity! Ingest service Hbase Backfill service Internet API service
  • 23. ViewCount V2 - Results:
  • 24. ViewCount V2 - Results: Request latency: min: 1ms max: 16.9ms median: 1.6ms p95: 2.6ms p99: 4.6ms Codes: 200: 10000
  • 25. ViewCount V2 - Results: Request latency: min: 1ms max: 16.9ms median: 1.6ms p95: 2.6ms p99: 4.6ms Codes: 200: 10000
  • 26. ViewCount V2 - Results: 20 billion commands! > 400GB in memory!
  • 27. Things to be aware of: 1. Redis Cluster shard maps - redirections, etc. Monitor redirections - gracefully restart workers after shard moves 2. AOF can slow down / fail large “redis-trib.rb” operations. Make sure to disable before / re-enable after! 3. Not all legacy systems support Redis Cluster, and if they do… They might not support it well (PHP-FPM)! 4. Over memory capacity behavior? Previously we would hard-crash - now we’d LRU old 1-view images. Neither are good, but for us, one is much less painful
  • 28. ViewCount V3? Approaching the point of minimal gains for man-hours, but what else might be fun? 1. Moving PHP7 off NodeJS API and directly to Redis Cluster Downsides: dealing with shard maps is complex is a stateless / process-per-request environment! 2. Using redis3's BITFIELD or HSet to save on key storage costs Downsides: complicate the system, reduce “hit-by-a-bus” issues - keys are just hashes, values are just counts! 3. Dealing with the nature of TCP Streams (TCP is not HTTP!) One connection to rule them all! - Node’s Cluster module helps, but perhaps Rust or Golang? Downsides: Vertical scaling is non-obvious on EC2
  • 29. ViewCount V2 - Results: Redis is: Faster - Imgur response time decreased ~50ms
  • 30. ViewCount V2 - Results: Redis is: Faster - Imgur response time decreased ~50ms Cheaper - EC2 cost reduced by 75%
  • 31. ViewCount V2 - Results: Redis is: Faster - Imgur response time decreased ~50ms Cheaper - EC2 cost reduced by 75% Simpler - No Java, no MR, no ZK, no third parties, just INCR + GET!
  • 32. Redis is: Faster - Imgur response time decreased ~50ms Cheaper - EC2 cost reduced by 75% Simpler - No Java, no MR, no ZK, no third parties, just INCR + GET! More fun! - I got to talk at RedisConf17! ViewCount V2 - Results: