ElastiCache Upgrade Engine for Redis

ElastiCache 支援線上更新 Engine 版本,而這個過程中,前端連線一定會受到影響,所以執行這個動作,務必選擇在業務”相對”離峰時間來執行,也建議在執行前先拿備份來創建新的集群來進行測試,已確認您的前端應用程式運行正常,也建議執行前做先快照備份(Redis Snapshot),另外該功能也只支援升版,並不支援降版,所以在執行前,也必需考量這樣的風險。

Jerry’s Notes
What’s next?
2 min readMar 19, 2022

--

!!! ElastiCache Memcached 也支援 Upgrade Engine,但因為 Memcached 原先不支援 Replication,也不支援 Snapshot backup,所以 Upgrade Engine 後會造成該節點上的數據遺失。

Upgrading engine versions — Amazon ElastiCache for Redis

You can control if and when the protocol-compliant software powering your cache cluster is upgraded to new versions that are supported by ElastiCache. This level of control enables you to maintain compatibility with specific versions, test new versions with your application before deploying in production, and perform version upgrades on your own terms and timelines.

ElastiCache Redis — Upgrade Engine

由從節點(Replica node)先執行,再執行主從切換,再執行原本身的主節點(Primary node)。

■ 單節點的話,會先 shutdown engine,更新後再重新啟動服務,所以受影響的時間較長,

■ Redis 集群模式(Cluster mode enable)下,多分片組會平行執行。

■ You can also upgrade your ElastiCache clusters with versions earlier than version 5.0.5. The process involved is the same but may incur longer failover time during DNS propagation (30s-1m).
■ Starting with Redis engine version 5.0.5, you can upgrade your cluster version with minimal downtime. The cluster is available for reads during the entire upgrade and is available for writes for most of the upgrade duration, except during the failover operation which lasts a few seconds.

■ If you upgrade to engine version 5.0.3 or higher and the number of vCPUs is at least 4, enhanced IO triggers and you can expect to see increased EngineCPUUtilization and CPUUtilization.
■ ElastiCache for Redis doesn’t support switching between Redis (cluster mode disabled) and Redis (cluster mode enabled).
■ Version 3.2.6 with In-Transit enable what can’t upgrade to version 3.2.10 (Due to this version didn’t support In-Transit)

Upgrade the Redis version 的影響?

Starting with Redis engine version 5.0.5, you can upgrade your cluster version with minimal downtime. The cluster is available for reads during the entire upgrade and is available for writes for most of the upgrade duration, except during the failover operation which lasts a few seconds.

■ You can also upgrade your ElastiCache clusters with versions earlier than 5.0.5. The process involved is the same but may incur longer failover time during DNS propagation (30s-1m).

■ The number or size of cache doesn’t have an effect on downtime, however the biggest the cache the more time it takes to complete the task as the cluster will be syncing more data.

Q: Can I downgrade to an earlier engine version?

No. Downgrading to an earlier engine version is not supported.

ElastiCache Redis 只支援 Engine 版本升版,並不支援降版,所以在執行前,也必需考量這樣的風險。

--

--

Jerry’s Notes
What’s next?

An cloud support engineer focus on troubleshooting with customer reported issue ,and cloud solution architecture.