ElastiCache for Redisの新機能をためしてみた


 (@con_mame) AWS MemcachedRedis使



RedisAWSElastiCache for Redis

ElastiCache for Redisrename使RedisVersion 2.6.132.8.6使 SlaveReplication GroupReplication Group11Endpoint URLEndpointMaster(ReplicationEndpoint使)

SlavePromoteMasterMasterSlave

Promote
$ aws elasticache modify-replication-group
  --replication-group-id レプリケーショングループID
  --primary-cluster-id PromoteするノードのID
  --apply-immediately

Replication

masterPromotePromoteSlaveMaster node

ElastiCacheRedis使

Replication GroupSlave1Endpointread onlyhaproxytwemproxy使Slave

SlaveELBMasterHeartbeatENIFailoverRedis Sentinel使Failover

ElastiCachePromoteSlave1Endpoint(ElastiCacheELB)

 

: http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/Welcome.html

SnapShot


RedisdbRecovery

snapshot(cache.t1.micro使)

snapshotBGSAVE



使Slave node

Redis BGSAVE

CLI
$ aws elasticache create-snapshot --cache-cluster-id hogecahce --snapshot-name hogesnapshot



Management Console

ss_1
Backup  

ss_2




ss_3
Backup Window

1

  SnapshotMONITOR
1399427528.007150 [0 127.0.0.1:34471] "set" "ElastiCacheMasterReplicationTimestamp" "2014-05-07T01:52:08.006Z" 1399427529.003567 [0 127.0.0.1:34471] "bgsave" 1399427529.022860 [0 127.0.0.1:34472] "ping"

bgsave

SnapShotcache.m1.medium1GBSnapShot10-15

Redis12

SnapShot 


$ aws elasticache create-cache-cluster --cache-cluster-id newcluster --snapshot-name hogesnapshot --cache-node-type cache.m1.medium

OK(Redis Version)

1SnapShotSnapShotnodeSecurity GroupReplication Group

SnapShot1Master nodeReplication GroupSecurity Group

SnapShot

1Endpoint URLEndpointSwap便

Route53DNSCNAMEEndpointDNS

RedisBGSAVEforkRedismaxmemoryswap

ElastiCachereserved-memory Parameter GroupElastiCache for Redis使



ElastiCache for Redis

AWSRedis使SnapShot

ElastiCache1Maintenance Window30node

  


使: https://speakerdeck.com/con_mame/elasticache-for-redis-snapshot