Redis is a non-relational database based on Key-value. Here I will describe how Redis installs the configuration under CentOS 7.Tools/Materials
CentOS 7
Redis
Method/Step
Redis Source Code Acquisition1. Get Redis's latest
Install the Azure PowerShell SDK (> 2015.04)Get and save the mooncake publishsettingsfile:get-azurepublishsettingsfile-environment AzurechinacloudImport Publishfile to Powershell:import-azurepublishsettingsfile–publishsettingsfile "path"Toggle
Note: This article mainly refers to the design and implementation of Redis1. Set Expiration time
Expire key time (in seconds)-this is the most common way
Setex (string key, int seconds, string value)--the way the string is unique
See everyone needs redis, and I work but not how to contact, special to learn, now first familiar with instructions, I through the Redis Chinese Interactive tutorial (interactive tutorial) to learn.1.redis is a data structure storage system that key-
about RedisRedis is an open source high-performance key-value pair database,The original author was Salvatore Sanfilippo of Italy,His GitHub is Antirez, and Redis's source code is also hosted on Git:Https://github.com/antirez/redis.Currently, VMware
The best way to learn Redis is to try it out while learning. Before learning about Redis's core content, familiarize yourself with the basics of how to install and run Redis, as well as the fundamentals of Redis, as described in practice.One, Redis
List data type listing typeThe list type is a bidirectional operation that adds a delete element from the head or tail of the linked listList can be used as a stack or as a queueTypes of list lists application scenarios:Get information on the latest
first, the Sentinel of RedisThe Redis Sentinel system is used to manage multiple Redis servers, which perform three main tasks1: Monitoring2: Reminders3: Automatic failoverSecond, configure SentinelModify sentinel.conf File Sentinel Monitor MyMaster
The manual learns that pipeline only sends out multiple REDIS instructions, and Redis does not guarantee that these specified executions are atomic; Multi is equivalent to a REDIS transaction, guaranteeing the atomicity of the entire operation,
According to a number of tests organized a plan:1. Redis Performance
Some simple tests for Redis are for informational purposes only:
Test environment: Redhat6.2, Xeon E5520 (4-core) *2/8g,1000m NIC
Redis version: 2.6.9
The
Redis is a highly memory-dependent NoSQL database that performs well with enough memoryIf you have only one machine to deploy Redis, be very careful.For example, I have a 24G server, which I would certainly allocate a lot of memory to Redis.Like 20G
In MyBatis, developers are allowed to customize their own caches, and this article uses Redis as a level two cache for MyBatis. Defining a Level Two cache in MyBatis requires the following configuration:1, mybatis support the total switch of level
1.1 Data typesThere are five data types used by Redis: string, hash, list, set, Zset (sorted set).Redis internally uses a Redisobject object to represent all keys and value, redisobject the most important information as shown inThe type represents
:Https://www.elastic.co/downloadsVersion: logstash-2.2.2Two Linux virtual machines, one Windows hostshipper:192.168.220.128 (CENTOS7)indexer:192.168.220.129 (CENTOS7)Broker (redis2.6): 192.168.220.1 (Windows) deploys a elasticsearch-1.6.0Shipper
Redis's current support for transactions is relatively straightforward, and redis guarantees that commands in a client-initiated transaction can be executed consecutively without inserting other client commands; When a client initiates a multi
Redis Hash is a string-type field and value mapping table. A key can correspond to more than one field, and one field corresponds to a value. Storing an object as a hash type can save memory more than storing each field as a string type. When a new
Redis Advanced Utility Features:1. Security2. master-slave replication3. Transaction processing4. Persistence mechanism5. Publish a subscription message6. Use of virtual memorySecurity:Set the password warning to be used before any other specified
RDB Persistence1. rdb files are used to save and restore all key-value pairs of data in all databases of the Redis server.2. The save command is executed directly by the server process, so the command blocks the server.3. Bgsave enables a child
The Redis server is an event driver and the server needs to handle the following two types of events:
File event: The Redis server connects to the client (or other Redis server) through a socket, and the file event is the server's
First, publish the subscription messageA publish Subscription (PUB/SUB) is a message communication pattern that is primarily designed to decouple the coupling between a message publisher and a subscriber, and Redis acts as a pub/sub server, with the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service