storage

  • Memcached: memory
  • Redis: memory, persistence, local disk
  • MongoDB: local disk
  • HBase: HDFS

The data type

  • Memcached: Supports only String data. The size of key data and value data is limited to 1 MB
  • Redis: The key must be a String, but the value can be a String, List, or Set. The data size limit is 500 MB to 1 GB larger than Memcached
  • MongoDB: Uses a JSON-like structure (BSON) to support data types that can be expressed by JSON, such as NULL, Boolean, numeric, string, and the maximum limit for a single document is 16 MB
  • HBase: Uses a column family and byte arrays for basic data. Each storage block has a limited data size and can be configured to support at least 64 MB of data

performance

  • Memcached: Standalone, multi-threaded, distributed and dependent on the client for consistent hashing control
  • Redis: master – slave synchronization, cluster support, single thread
  • MongoDB: the first two are in-memory, so MongoDB is definitely a bit of a disadvantage, compared to MySql might be more appropriate. Master-slave mode is supported, and shard based horizontal distributed scaling is supported
  • HBase: The backend is HDFS, so you know

Typical application

  • Memcached: Acts as a caching layer for relational databases to speed data access
  • Redis: as a caching layer for relational databases, accelerating data access; It also provides data landing function
  • MongoDB: Schema-less database, used to replace MySql in scenarios with fast changes and low transactional requirements, such as storage of game user information and social information
  • HBase: stores massive data and requires high concurrent query, such as logs



Do not copy Spark to write in parallel

Reprint please indicate the source: blog.guoyb.com/2018/06/02/…

Please use wechat to scan the qr code below and follow my wechat official account TechTalking. Technology · Life · Thinking:

Back end technology little black room