📅  最后修改于: 2020-11-07 03:18:15             🧑  作者: Mango
Elasticache有两种类型:
因为,Memcached将数据存储在服务器的主内存中,而内存中的存储则不必进入磁盘以获取数据。因此,它具有更快的响应时间,并且每秒支持数百万次操作。
Memcached的设计非常简单,使其功能强大且易于在应用程序开发中使用。它支持多种语言,例如Java,Ruby, Python,C,C++等。
Memcached的体系结构是分布式和多线程的,易于扩展。您可以在多个节点之间拆分数据,从而可以通过添加新节点来扩展容量。它是多线程的,意味着您可以扩展计算能力。
社区是一个充满活力的社区支持的开源。 WordPress和Django等应用程序使用Memcached来提高性能。
它实现了高性能的内存中缓存,可减少数据访问延迟,增加延迟并减轻后端系统的负载。它可以在不到一毫秒的时间内提供缓存的项目,还使您能够轻松而经济高效地扩展较高的负载。
应用程序开发人员通常使用它来存储和管理基于Internet的应用程序的会话数据。它提供了毫秒级的延迟,并且还可以缩放管理会话状态(例如用户配置文件,凭据和会话状态)所需的大小。
Data type | Description |
---|---|
Strings | It is a text with up to 512MB in size. |
Lists | It is a collection of strings. |
Sets | It is an unordered collection of strings with the ability to intersect, union. |
Sorted sets | The sets which are ordered by value. |
Hashes | It is a data structure used for storing the fields and its associated values. |
Bitmaps | It is a data type that provides bit-level operations. |
HyperLogLogs | It is a probabilistic data structure used to estimate the unique items in a data set. |
Basis for Comparison | Memcached | Redis |
---|---|---|
Sub-millisecond latency | Its response time is in sub-millisecond as it stores the data in memory which reads the data more quickly than disk. | Its response time is in sub-millisecond as it stores the data in memory which read the data more quickly than disk. |
Developer ease of use | Its syntax is simple to understand and use. | Its syntax is simple to understand and use. |
Distributed architecture | Its distributed architecture distributes the data across multiple nodes which allows to scale out more data when demand grows. | Its distributed architecture distributes the data across multiple nodes which allows to scale out more data when demand grows. |
Supports many different programming languages | It supports languages such as C, C++, java, python, etc. | It supports languages such as C, C++, java, python, etc. |
Advanced data structure | It does not support advanced data structures. | It supports various advanced data structures such as sets, sorted set, hashes, bit arrays, etc. |
Multithreaded Architecture | It supports multithreaded architecture means that it has multiple processing cores. This allows you to handle multiple operations by scaling up the compute capacity. | It does not support multithreaded architecture. |
Snapshots | It does not support the snapshots. | Redis also keeps the data in a disk as a point-in-time backup to recover from the fault. |
Replication | It does not replicate the data. | It provides a primary replica architecture that replicates the data across multiple servers and scales the database reads. |
Transactions | It does not support transactions. | It supports transactions that let to execute a group of commands. |
Lua Scripting | It does not support Lua Scripting. | It allows you to execute Lua Scripts which boost performance and simplify the application. |
Geospatial support | It does not provide Geospatial support. | It has purpose-built commands that work with geospatial data, i.e, you can find the distance between two elements or finding all the elements within a given distance. |