

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 比較節點型 Valkey、Memcached 和 Redis OSS 叢集
<a name="SelectEngine"></a>

Amazon ElastiCache 支援 Valkey、Memcached 和 Redis OSS 快取引擎。每個引擎都提供一些優點。使用本主題中的資訊來協助您選擇最符合您需求的引擎和版本。

**重要**  
建立快取、節點型叢集或複寫群組之後，您可以升級至較新的引擎版本，但無法降級至較舊的引擎版本。如果您想要使用較舊的引擎版本，則必須刪除現有的快取、節點型叢集或複寫群組，並使用較舊的引擎版本再次建立。

這兩個引擎表面上看起來很類似。每個引擎都是記憶體內金鑰/值存放區。不過，實際上有顯著的差異。

**如果適用下列情況，請選擇 Memcached：**
+ 您需要盡可能最簡單的模型。
+ 您需要執行具有多個核心或執行緒的大型節點。
+ 您需要能夠向外和向內擴展，並視您系統需求增加和減少來新增和移除節點。
+ 您需要快取物件。

**如果下列適用於您，請選擇具有 ElastiCache 的 Valkey 或 Redis OSS：**
+ **適用於 Valkey 的 ElastiCache 9.0 版**

  您想要內建[的全文搜尋、彙總和混合式搜尋](https://github.com/valkey-io/valkey-search)功能，可擴展 Valkey 8.2 中引入的向量搜尋、每個欄位 TTLs的[雜湊欄位過期](https://github.com/valkey-io/valkey/pull/2089)、[叢集模式中的多資料庫支援](https://github.com/valkey-io/valkey/pull/1671)、[多邊形式地理空間查詢](https://github.com/valkey-io/valkey/pull/1809)、[管道或原子槽遷移高達 40% 的輸送量](https://github.com/valkey-io/valkey/pull/2092)，以實現更安全的叢集擴展。 [https://github.com/valkey-io/valkey/pull/1949](https://github.com/valkey-io/valkey/pull/1949)如需詳細資訊，請參閱 [Valkey 9.0。](VersionManagement.md#valkey-version-9.0)
+ **適用於 Valkey 的 ElastiCache 8.2 版**

  您想要具有微秒延遲和 95% 以上取回率的原生[向量搜尋](search.md)。如需詳細資訊，請參閱 [Valkey 8.2。](VersionManagement.md#valkey-version-8.2)
+ **適用於 Valkey 的 ElastiCache 8.1 版**

  您想要[新的記憶體效率雜湊資料表](https://valkey.io/blog/new-hash-table/)，可將記憶體負荷降低高達 20%、原生 [Bloom 篩選條件](https://valkey.io/topics/bloomfilters/)支援、[COMMANDLOG](https://valkey.io/commands/commandlog-get/) 命令，以及 BITCOUNT 輸送量提高高達 514%。如需詳細資訊，請參閱 [Valkey 8.1。](VersionManagement.md#valkey-version-8.1)
+ **適用於 Valkey 的 ElastiCache 8.0 版**

  您想要透過[內嵌金鑰](https://github.com/valkey-io/valkey/pull/541)、[每個插槽指標](https://github.com/valkey-io/valkey/pull/20)、[雙通道複寫](https://github.com/valkey-io/valkey/pull/60)和非[同步 I/O 執行緒](https://github.com/valkey-io/valkey/pull/763)，提升高達 20% 的記憶體效率。如需詳細資訊，請參閱 [Valkey 8.0。](VersionManagement.md#valkey-version-8)
+ **適用於 Valkey 的 ElastiCache 7.2 版或適用於 Redis OSS 的 7.0 版 （增強版）**

  您想要使用 [函數](https://valkey.io/topics/functions-intro/)、[碎片 Pub/Sub ](https://valkey.io/topics/pubsub/)或 [ACL 改進](https://valkey.io/topics/acl/)。如需詳細資訊，請參閱 [Redis OSS 7.0 版 （增強版）。](engine-versions.md#redis-version-7.0)
+ **適用於 Redis OSS 的 ElastiCache 6.2 版 （增強版）**

  您希望能夠使用 r6gd 節點類型在記憶體和 SSD 之間將資料分層。如需詳細資訊，請參閱[資料分層](data-tiering.md)。
+ **適用於 Redis OSS 的 ElastiCache 6.0 版 （增強版）**

  您想要使用角色型存取控制驗證使用者。

  如需詳細資訊，請參閱 [Redis OSS 6.0 版 （增強版）。](engine-versions.md#redis-version-6.0)


**Memcached、Valkey 或 Redis OSS （停用叢集模式） 和 Valkey 或 Redis OSS （啟用叢集模式） 的比較摘要**  

|  |  Memcached  |  Valkey 或 Redis OSS （停用叢集模式）  |  Valkey 或 Redis OSS （啟用叢集模式）  | 
| --- |--- |--- |--- |
| Engine versions\+ | 1.4.5 and later | 4.0.10 and later | 4.0.10 and later | 
| Data types | Simple  | 2.8.x - Complex \* | 3.2.x and later - Complex  | 
| Complex  | 
| Data partitioning | Yes | No | Yes | 
| Cluster is modifiable | Yes | Yes | 3.2.10 and later - Limited | 
| Online resharding | No | No | 3.2.10 and later | 
| Encryption | in-transit 1.6.12 and later | 4.0.10 and later | 4.0.10 and later | 
| Data tiering | No | 6.2 and later | 6.2 and later | 
| Memory efficiencies | No | Valkey 8.0 and later | Valkey 8.0 and later | 
| Bloom filters | No | Valkey 8.1 and later | Valkey 8.1 and later | 
| Vector search | No | Valkey 8.2 and later | Valkey 8.2 and later | 
| Full-text search | No | Valkey 9.0 and later | Valkey 9.0 and later | 
| Hybrid search (text \+ vector) | No | Valkey 9.0 and later | Valkey 9.0 and later | 
| Aggregation pipelines | No | Valkey 9.0 and later | Valkey 9.0 and later | 
| Hash field expiration | No | Valkey 9.0 and later | Valkey 9.0 and later | 
| Numbered databases in cluster mode | No | N/A | Valkey 9.0 and later | 
| 合規認證 | 
| --- |
| Compliance Certification     FedRAMP<br />    HIPAA<br />    PCI DSS |   是 - 1.6.12 和更新版本<br />是 - 1.6.12 和更新版本<br />是 |   4.0.10 和更新版本<br />4.0.10 和更新版本<br />4.0.10 和更新版本 |   4.0.10 和更新版本<br />4.0.10 和更新版本<br />4.0.10 和更新版本 | 
| Multi-threaded | Yes | No | No | 
| Node type upgrade | No | Yes | Yes | 
| Engine upgrading | Yes | Yes | Yes | 
| High availability (replication) | No | Yes | Yes | 
| Automatic failover | No | Optional | Required | 
| Pub/Sub capabilities | No | Yes | Yes | 
| Sorted sets | No | Yes | Yes | 
| Backup and restore | For serverless caches only, not applicable to node-based clusters | Yes | Yes | 
| Geospatial indexing | No | 4.0.10 and later | Yes | 
| 備註： | 
|  string, objects (like databases) | 
| \* string, sets, sorted sets, lists, hashes, bitmaps, hyperloglog | 
|  string, sets, sorted sets, lists, hashes, bitmaps, hyperloglog, geospatial indexes | 
| \+ Excludes versions which are deprecated, have reached or soon to reach end of life. | 

選擇適用於您叢集的引擎之後，我們建議您使用該引擎的最新版本。如需詳細資訊，請參閱[支援的節點類型](CacheNodes.SupportedTypes.md)。