redis & mongodb: stop big data indigestion before it starts

19
Redis & MongoDB Stop Big Data Indigestion Before It Starts @itamarhaber

Upload: mongodb

Post on 25-Jul-2015

420 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

Redis & MongoDBStop Big Data Indigestion Before It Starts

@itamarhaber

Page 2: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

@itamarhaber

A Redis Geek and Chief Developer AdvocateatHave you signed for newsletter?[1] https://redislabs.com/redis-watch-archive

Page 3: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

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

Page 4: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

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

Page 5: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

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.

Page 6: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

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

Page 7: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

● "...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)

Page 8: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

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

Page 9: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

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!

Page 10: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

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

Page 11: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

Use case A: with Redis

Diagram:

Before: Firehose -> Mongo & Hadoop -> MongoAfter : Firehose -> Redis & Hadoop -> Mongo

Page 12: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

TBD

Sessions events

Page 13: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

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.

Page 14: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

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!

Page 15: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

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!

Page 16: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

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!

Page 17: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

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!

Page 18: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

Questions from the audience

?

Page 19: Redis & MongoDB: Stop Big Data Indigestion Before It Starts

Questions or feedback? Contact me!

Itamar HaberChief Developer Advocate

📧 [email protected]@itamarhaber