22

Redis : Database, cache, pub/sub and more at Jelly button games

Embed Size (px)

Citation preview

Page 1: Redis : Database, cache, pub/sub and more at Jelly button games
Page 2: Redis : Database, cache, pub/sub and more at Jelly button games

● Jelly Button Games - Introduction

● Pirate Kings - Growth Challenges

● Redis Use Cases

● Summary

Page 3: Redis : Database, cache, pub/sub and more at Jelly button games
Page 4: Redis : Database, cache, pub/sub and more at Jelly button games
Page 5: Redis : Database, cache, pub/sub and more at Jelly button games

Spin the wheel to earn cash and build your island. Attack and steal from your friends, But beware they can take revenge!

Page 6: Redis : Database, cache, pub/sub and more at Jelly button games
Page 7: Redis : Database, cache, pub/sub and more at Jelly button games

Pirate Kings

Page 8: Redis : Database, cache, pub/sub and more at Jelly button games

● Soft launch in Israel and Sweden

● Featured in Google Play Asia

● Game grew virally from 100K to 3.5M in 3 months

● 2M Daily Active Users in 10 days

○ 1M requests per minute

Page 9: Redis : Database, cache, pub/sub and more at Jelly button games

● “Always online” players

● Social network with interactions

● Near real-time

○ No lazy dumps

Page 10: Redis : Database, cache, pub/sub and more at Jelly button games

Pirate Kings

Page 11: Redis : Database, cache, pub/sub and more at Jelly button games

- Our “Swiss Army Knife”

- Using ServiceStack’s Redis client

- Efficient

- Running on RedisLabs

Page 12: Redis : Database, cache, pub/sub and more at Jelly button games

● 100GB DB’s

● Clustered DB’s have 5 shards each (multi-AZ)

● At least 8 CPUs per instance

● Latency: 0.1 msec (avg)

● Network usage: 80k-90k packets/second

Page 13: Redis : Database, cache, pub/sub and more at Jelly button games

Redis

Page 14: Redis : Database, cache, pub/sub and more at Jelly button games

● Cache

● Leaderboard

● Persistent DB

● Pub/Sub

● Time Sync

Page 15: Redis : Database, cache, pub/sub and more at Jelly button games

● 13M keys

● 2,500 concurrent connections

● 20K ops/sec

● Average latency of 0.06ms

Page 16: Redis : Database, cache, pub/sub and more at Jelly button games

● A leaderboard is a SortedSet

● Global / Per Country Leaderboard

● Complexity: O(log(n))

Page 17: Redis : Database, cache, pub/sub and more at Jelly button games

● Logging malicious users’ IPs

(INC with TTL)

● Identifying social relations

(Set)

● Cash King super-fast calculation

(SortedSet)

● Beware: Unbounded growth

Page 18: Redis : Database, cache, pub/sub and more at Jelly button games

● Instant player updates

● Configuration changes

Page 19: Redis : Database, cache, pub/sub and more at Jelly button games

● Time syncing issue between

AWS servers

● Used Redis as “Central Time”

● Avoid using as a solution for

time sensitive features

Page 20: Redis : Database, cache, pub/sub and more at Jelly button games
Page 21: Redis : Database, cache, pub/sub and more at Jelly button games

● Jelly Button Games - Introduction

● Pirate Kings - Growth Challenges

● Redis Use Cases

Page 22: Redis : Database, cache, pub/sub and more at Jelly button games

Nir [email protected]