12

Redis : Play buzz uses Redis

Embed Size (px)

Citation preview

Page 1: Redis : Play buzz uses Redis
Page 2: Redis : Play buzz uses Redis

A little bit about myself

Chen Salomon, Data architect– [email protected]

First developer @ Playbuzz

The guy that still wakes when shit hits the fan…

Currently leading (data) solutions

Page 3: Redis : Play buzz uses Redis

Playbuzz

3 years old

4 locations (Israel, NY, London, Hamburg)

100 employees

30 in RnD (we are still small…)

Page 4: Redis : Play buzz uses Redis

Seconds on a page

60% 78% 15

Source: Wall Street Journal, 2014

Changes in internet content

of internet users don’t

read entire articles

Web publishers

get

of traffic through

referrals from

Facebook on

average

User stays only

Page 5: Redis : Play buzz uses Redis

Playbuzz is the king of Engaging Content™

7,000+publishers can’t

be wrong

Page 6: Redis : Play buzz uses Redis

Formats

Gallery QuizTriviaPersonality QuizListRevealRanked List

Countdown ListPoll

Open List

Photo Caption

Video

Page 7: Redis : Play buzz uses Redis

THE SECRET SAUCE

Page 8: Redis : Play buzz uses Redis

• Keep it simple and super slim – We always try to keep our

production with as few servers as possible

• Be lazy – We pay a lot on insert and barely work on reads

• Know your traffic

• Enabling the business to scale at minimal cost

How we do it?

Page 9: Redis : Play buzz uses Redis

• Object caching

• Production usage

• Keeping items in cache (lazy initialization) – objects (strings)

• List management as sorted sets

• Permissions are hashmaps

Where you can find Redis in our system?

Page 10: Redis : Play buzz uses Redis

• Distributed HTML Output caching

• ETL session management and enrichments

• Session parameters are objects

• IP to location (in a few seconds)

Where you can find Redis in our system?

Page 11: Redis : Play buzz uses Redis

Most recent Redis project

IP to location

• Location objects are hash-maps

• Convert IP to integers

• e.g. IP 10.0.0.138 -> 10 *(256^3) + 0 *(256^2) + 0 *(256) + 138

*(256^0) =167772298

• ZRANGEBYSCORE to find the range (position) – returns the first item

that larger than the IP.

• HGETALL for the returned position

• Challenges

• IP V6 (same idea –different multiplier)

• Empty subnets – You can’t use only lower/upper bounds

Page 12: Redis : Play buzz uses Redis

We are hiring – [email protected]