Monday, August 15, 2016

Redis Vs. Memcached



1.Comparison
Name
Memcached  
Redis  
Description
In-memory key-value store, originally intended for caching
In-memory data structure store, used as database, cache and message broker 
Ranking
Rank 22 
Score 32.42 
Rank 10 
Score 100.65 
Database Model
Website
Technical Documentation
Developer
Danga Interactive 
Salvatore Sanfilippo 
Initial release
2003
2009
Current release
1.4.24, April 2015
3.0.3, June 2015
License
Open Source 
Open Source 
Database as a Service (DBaaS) 
No
No
Implementation language
C
C
Server operating systems
FreeBSD
Linux
OS X
Unix
Windows
BSD
Linux
OS X
Windows 
Data Scheme
Schema-free
Schema-free
Data Types
1)Limits key names to 250 bytes, limits values to 1MB 
2)Works only with plain strings 
1)Key names and values to be as large as 512MB each,they are binary safe. 
2)Has six data types that enable more intelligent caching and manipulation of cached data.   
XML support 
No
No
Secondary indexes
No
No
SQL
No
No
APIs and other access methods
Proprietary protocol
Proprietary protocol 
Supported programming languages
.Net
C
C++
ColdFusion
Erlang
Java
Lisp
Lua
OCaml
Perl
PHP
Python
Ruby
C
C#
C++
Clojure
Crystal
D
Dart
Elixir
Erlang
Fancy
Go
Haskell
Haxe
Java
JavaScript (Node.js)
Lisp
Lua
MatLab
Objective-C
OCaml 
Perl
PHP
Prolog
Pure Data
Python
R
Rebol
Ruby
Rust
Scala
Scheme
Smalltalk
Tcl
Server-side scripts and Commands 
No
Lua Script and 160-Plus Commands
Triggers
No
No
Partitioning Methods 
Client/Proxy Sharding
Client/Proxy Sharding and Redis Cluster 
Replication Methods 
No
Master-Slave replication 
MapReduce
No
No
Consistency concepts 
No
Eventual Consistency
Foreign keys 
No
No
Transaction concepts 
No
Optimistic locking, atomic execution of commands blocks and scripts
Concurrency 
Yes
Yes 
Persistence
No
Yes, Can Disable
Eviction policies 
1)noeviction 
2)allkeys-lru: 
3)volatile-lru 
4)allkeys-random 
5)volatile-random 
6)volatile-ttl 
http://redis.io/topics/lru-cache 
Timeout keys 
1)Explicit expiration times. 
2)Delete cached objects when we know we're doing something  
that will cause them to be invalid but are not in a position to update them while we're at it. 
3)Include timestamps on cached objects and do our own expiries based on dependencies. 
[https://www.mediawiki.org/wiki/Memcached 
]
1)EXPIRE 
2)EXPIREAT 
3)TTL 
4)PERSIST 
5)SETEX 
In-memory capabilities 
Yes
Yes
Performance
good
Very good
Security
http://dustin.sallings.org/2010/08/08/memcached-security.html\\http://redis.io/topics/security\\
2.Reference

1 comment:

  1. Just wish to say your article is as astonishing. Very enlightening stuff.

    Optimized360 have designed the best and #1 dental websites for their clients that resulted into growing number of patients that they have never experienced before.

    ReplyDelete