

Special instructions for the contents of the configuration file

because redis By default, you will find that you can only connect locally, No remote access, Use Redis Desktop Manager Error will be reported when connecting, So you need to mount it manually redis The configuration file. Prepare container data directory mkdir -p /usr/redis/confīefore starting, you need to create Redis Externally mounted configuration files ( /home/redis/conf/nf ) The reason is to create, Because Redis The container itself exists only /etc/redis Catalog, It doesn't create nf When the server and container do not exist nf When you file, When executing the start command docker Will nf Create as a directory, This is not the result we want. Without specifying a version, The default is to pull the latest version. Portability :Redis Use standard C language-written, Can run on most operating systems, such as Linux,Mac,Solaris etc.Command prompt function :Redis The client has powerful command prompt function, It's very convenient to use, Lower the learning threshold.

Multi purpose tools : Redis There are many uses, For example, it can be used as a cache 、 Message queue 、 build Redis Cluster etc.Extremely high performance :Redis Data storage based on memory, Its reading speed is 110000 Time /s, The writing speed is 81000 Time /s.Theoretically Redis Each key、value The size does not exceed 512 MB. But we know that, Computer memory is a very precious resource, therefore Redis Not suitable for storing large files or binary data, Otherwise, an error will occur ,Redis Suitable for storing smaller text information. īe careful :Redis Memory based data storage, So it's very fast. thus it can be seen, Simplify the complex high concurrency and high availability business model ,Redis It can be called a generation of artifact. Of course ,Redis There are many practical application scenarios, But in general, the eyes of most application scenarios are to save data in redis in, And then use it Redis To achieve high availability of business scenarios 、 High concurrency and other business problems. For the above business scenarios ,Redis It's going to come in handy, A very simple idea, We can initialize the relevant information of the product to redis in, When the user accesses, Can be directly from Redis Get data in and return it to the user, In this case ,mysql The number of visits has been reduced a lot, At the same time, the access speed of users will also be greatly improved. Another example is in the business of shopping mall, Everyone is familiar with seckill scenes, Often, e-commerce officials launch a product, Then at a specific point in time, develop the ordering function to the majority of consumers, So at that particular point in time, Maybe the system platform will reach 10W+ Of QPS Traffic volume ,10w+ Of QPS, If you point directly to the database, Database crashes easily, It caused the whole system to crash. for example, The front page of the website needs to be visited frequently, And more resources will be consumed in the process of creating the home page, You can use Redis Cache the whole home page, So as to reduce the pressure on the website, Reduce page access latency. therefore Redis It is generally used to cache some frequently accessed hot data 、 Or resource intensive content, By putting these contents into Redis in, It allows applications to read them quickly.

Redis Data access based on memory, Relative to disk, Its reading and writing speed is several orders of magnitude higher. Disk stored database, The reading and writing efficiency is low due to the mechanical movement of the magnetic head and system call. The storage methods of database can be divided into two categories, Disk based storage and memory based storage. Redis Support data backup, namely master-slave Mode data backup.Redis It's not just about supporting simple key-value Data of type, It also provides list,set,zset,hash Such as data structure storage.Redis Support data persistence, You can save the data in memory in disk in, When you restart, you can load it again for use.
Mongodb mac shutdown full#
Redis Full name Remote Dictionary Server( Remote dictionary service ), It is a key value type non relation based on memory implementation (NoSQL) database, Use ANSI C Language writing 、 comply with BSD agreement 、 Support network 、 Can be based on memory 、 Distributed 、 Optional persistent key value pairs (Key-Value) Storage database. Redis brief introduction Redis brief introduction
