Why redis soon?

  • Based entirely on memory, most of the requests is pure memory operation, high efficiency (KV database using a single-threaded, single-process model, written in C language, the data is stored in memory, the hard disk will not be the time to read and write IO limit)
  • Simple data structures, the data is also simple operation (table is not used, not the forced association between the data storage structure is a key-value pair, and hashMap type, lookup time complexity is O (1))
  • Single-threaded, single-threaded can also handle high concurrent requests, you can also start a multi-core multi-instance (the IO thread and business separate thread, use the thread pool thread business, avoid frequent creating and destroying threads)
  • IO multiplexing using multiple models, non-blocking IO

Guess you like

Origin www.cnblogs.com/lisongyu/p/11575483.html