use case for using the elasticache for redis in production
DESCRIPTION
TRANSCRIPT
![Page 1: Use case for using the ElastiCache for Redis in production](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/1.jpg)
Use case for using the ElastiCache for Redis
in Production.
![Page 2: Use case for using the ElastiCache for Redis in production](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/2.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/3.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/4.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/5.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/6.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/7.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/8.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/9.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/10.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/11.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/12.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/13.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/14.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/15.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/16.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/17.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/18.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/19.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/20.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022042606/53f4f06e8d7f728e318b49f9/html5/thumbnails/21.jpg)
Thank you!!