Use case for using the ElastiCache for Redis in production

21
Use case for using the ElastiCache for Redis in Production.

description

 

Transcript of Use case for using the ElastiCache for Redis in production

Page 1: Use case for using the ElastiCache for Redis in production

Use case for using the ElastiCache for Redis

in Production.

Page 2: Use case for using the ElastiCache for Redis in production

Table of contents

• Self-introduction• The minimum knowledge needed Redis

operation• gumi’s Redis Operation• Warning for operating ElastiCache for Redis• Summary

Page 3: Use case for using the ElastiCache for Redis in production

Table of contents

• Self-introduction• The minimum knowledge of Redis operation• gumi’s Redis Operation• Warning for operating ElastiCache for Redis• Summary

Page 4: Use case for using the ElastiCache for Redis in production

Self-introduction

• Tomonori Honma • gumi Inc.

• System Operation Engineer• All Game Server’s operarion in Japan• I don’t develop Game Events

• My favorite AWS Service:Amazon S3 @CkReal

Page 5: Use case for using the ElastiCache for Redis in production

Table of contents

• Self-introduction• The minimum knowledge needed Redis

operation• gumi’s Redis Operation• Warning for operating ElastiCache for Redis• Summary

Page 6: Use case for using the ElastiCache for Redis in production

The minimum knowledge of Redis operation

• Key Value Store• In-memory is very fast

• When is storing data over memory in Server, is controlled by maxmemory-policy(Parameters Group) settings. (default:volatile-lru)

• Two methods for Data Persistence• Append-only file• RDB file

• Can use multiple databases

Page 7: Use case for using the ElastiCache for Redis in production

Table of contents

• Self-introduction• The minimum knowledge needed Redis

operation• gumi’s Redis Operation• Warning for operating ElastiCache for Redis• Summary

Page 8: Use case for using the ElastiCache for Redis in production

gumi's Previous Generation Architecture

memcached

RDS(MySQL5.5)

app

player-shard

others

staticjobqredis

M

S

M

S

masterSQS

Page 9: Use case for using the ElastiCache for Redis in production

gumi's RecentGeneration Architecture

redis

RDS(MySQL5.6)

app

jobq

S

SQSstatic(S3)

Page 10: Use case for using the ElastiCache for Redis in production

The Use caseof Application

• User’s actions in game events can be immediately reflected in Redis.

• example• Realtime Ranking• Matching process of each player• Card Deck Information

Page 11: Use case for using the ElastiCache for Redis in production

The Use caseof Operation

• Error Tracking Tool(Sentry) use as a Buffer• Recent Operation tools sometimes uses Redis

• For quick checks, EC2 is very troublesome.

Page 12: Use case for using the ElastiCache for Redis in production

gumi’s Redis Operation

• Using almost master-slave• A few games use master only

• master : AOF and no RDB, slave : AOF and RDB• One GET operation takes sometimes 2.47sec???• Fork time in different systems

• Multiple backups of RDB are saved• This is to avoid problem where master DB is

flushed and that wipes out slave backup too.• The use multiple databases in one Redis node• Instead of memcached, use redis

• Developer is difficult to understand the timing of memcached's eviction.

Page 13: Use case for using the ElastiCache for Redis in production

Table of contents

• Self-introduction• The minimum knowledge needed Redis

operation• gumi’s Redis Operation• Warning for operating ElastiCache for Redis• Summary

Page 14: Use case for using the ElastiCache for Redis in production

Possible and Not (yet) possible

Possible Not (yet) possible

No EC2 instance!!Import data file from S3Configure AOF settingUse awscliPromotion of replica node

Auto failover like RDSBackup RDB file to S3Change instance typePoint-In-Time-Recovery

Page 15: Use case for using the ElastiCache for Redis in production

Possible and Not (yet) possible

Possible Not (yet) possible

No EC2 instance!!Import data file from S3Configure AOF settingUse awscliPromotion of replica node

Auto failover like RDSBackup RDB file to S3Change instance typePoint-In-Time-Recovery

2014/04/24 ReleaseBackup time includes time

taken to upload RDB file to S3?EC2 : few min

ElastiCache : Tens of minutes

Page 16: Use case for using the ElastiCache for Redis in production

Possible and Not (yet) possible

Possible Not (yet) possible

No EC2 instance!!Import data file from S3Configure AOF settingUse awscliPromotion of replica node

Auto failover like RDSBackup RDB file to S3Change instance typePoint-In-Time-Recovery

Page 17: Use case for using the ElastiCache for Redis in production

Possible and Not (yet) possible

Possible Not (yet) possible

No EC2 instance!!Import data file from S3Configure AOF settingUse awscliPromotion of replica node

Auto failover like RDSBackup RDB file to S3Change instance typePoint-In-Time-Recovery

ElastiCache for Redis is still nothigh-performance like RDS

Page 18: Use case for using the ElastiCache for Redis in production

ElastiCache for Redisimpression

• There is nothing wrong in performance• When you create a snapshot, it is recommended to run

from slave• Backup and Restore ElastiCache Redis Clusters

• appendonly settings is not available in cache.t1.micro• We have not experienced a big problem with

ElastiCache for Redis• When AOF file is corrupted, I have restored from

RDB file of slave server.

Page 19: Use case for using the ElastiCache for Redis in production

Table of contents

• Self-introduction• The minimum knowledge needed Redis

operation• gumi’s Redis Operation• Warning for operating ElastiCache for Redis• Summary

Page 20: Use case for using the ElastiCache for Redis in production

Summary

• Can prepare redis nodes in a short period of time• Since we have very few operation enginners in

our company, this is very helpful :)• Initially, functions we assumed to exist actually

were not yet implemented• But feature set has grown

• Currently, there are no big problems• we are increasing the number of production nodes

Page 21: Use case for using the ElastiCache for Redis in production

Thank you!!