redis & mongodb: stop big data indigestion before it starts
TRANSCRIPT
Redis & MongoDBStop Big Data Indigestion Before It Starts
@itamarhaber
@itamarhaber
A Redis Geek and Chief Developer AdvocateatHave you signed for newsletter?[1] https://redislabs.com/redis-watch-archive
You probably haven't seen anything like this before
BIGD
Volume
Velocity Variet
y
MongoDB truly excels when is comes to volume and variety of data……but data coming in at extreme velocity posesa digestive challenge forfor any disk-based database
A talk about MongoDB performance
[2] WiredTiger iiBench Results
NOT!I'm hardly an expert, but with MongoDB v3 storage engines and future work this could very well be a moot point
Data ingestion at high velocity
Mobile, online and IoT appsproduce more and more datawith every day that passes.
Simply storing the data as itcomes in doesn't cut it anymore – real time processing is a must in order distill information from the data as it rushes in.
A talk about more performance
By doing LESSyou can do MORE(with MongoDB)
Put differently, "chew" your data with Redis to prevent data ingestion indigestion
● "...an [4] open source, BSD licensed, advanced key-value cache and store"
● 5+2 data types, 160+ commands, entirely in RAM, Lua scripts, PubSub...
● Nee circa 2009, by [5] antirez(a.k.a Salvatore Sanfilippo)
● Sponsored by Pivotal
[3] Redis (REmote Dictionary Server)
OSS, humane, pure, flexible, efficient, scalable, highly
clusterable,sexy, fresh,is activelyton of uses,
has a client in everylean & small, supple,
track record, tiny, and much moar...
...fun & easy, free inspiring, simple, innovative, robust, available, cool, portable, geeky, mature, stable, developed, has arich, dependable,every language, proven production vibrant community,
Why use Redis
❤❤1.5M ops / secusing a singleEC2 instance![6] Recorded webinar
Because it is
Use case A: Google Analytics
• A real time analytics platform• Strongly focuses on users' behavior• Primary data storage is MongoDB• Activity is collected immediately or in bulks• Raw data fed to Hadoop for offline crunching• Real time metrics and initial information from
the stream is obtained with Redis
NOT!
Use case A: Sessionization
• Analyzing sessions• Stream of user activities• Stored as documents• 10s-1000s events each• Different users interleaved• The result: multiple small
updates to each session document
Use case A: with Redis
Diagram:
Before: Firehose -> Mongo & Hadoop -> MongoAfter : Firehose -> Redis & Hadoop -> Mongo
TBD
Sessions events
Once you see it, it can't be unseen
Using Redis as a buffer in front of MongoDB for write-intensive, hot Big Data is a useful pattern that makes it easy to get information in real time as well as distribute the load more efficiently.
Use case B: Waze
• An international navigation app/service• Strongly focuses on public transit• 10s of millions of users during peak hours• Primary data storage is MongoDB• Base data is created in advance• Real time updates (traffic, vehicles and
passengers) pour into Redis for scheduling adjustments and notifications
NOT!
Use case C: Tindr
• A dating app/service• Strongly focuses on spatially-related groups• Primary data storage is MongoDB• Data includes user profiles & preferences• An influx of positional and preferential
("swipes") events is first munched by Redis
NOT!
Use case D: Clash of Clans
• A massive real time game• Strongly focuses on matched team play• 1000s of teams with 100s of members• Primary data storage is MongoDB• Match progress is sieved through Redis for
real time resources status, leaderboards and scoring
NOT!
Use case E: Weather.com
• IoT startup• Focuses on environmental monitoring• Pilot: real time fire fighting• Primary data storage is MongoDB• Sensor data (temperature, humidity, …) is
aggregated in Redis, providing warnings and alarms in real time
NOT!
Questions from the audience
?
Questions or feedback? Contact me!
Itamar HaberChief Developer Advocate
📧 [email protected]@itamarhaber