on the difference and summary of memcache and Redis
Redis and memcached Overall comparison
1 Performance comparison: Because Redis only use a single core, and memcached can use multi-core, so on average each kernel Redis in storing small data than
Redis Remote connection times wrong
I installed Redis on a remote server (Ubuntu system) and encountered the following problems when I visited locally:
Redis.clients.jedis.exceptions.JedisConnectionException:Could not get a resource from the
Redis 3 All commands
Note: This article refer to Redis Chinese web, content update. The list of commands in the redis.cn redis Chinese network is Redis version 2.8, this article is the latest Redis 3.0 version of all the commands (in fact, more
1. Install gcc
Redis is deployed on a Linux system in a real production environment, so start with a Linux
Redis installation requires GCC, first ensure that GCC is installed on Linux
Enter GCC, prompting for no command, stating that GCC is not
Transferred from timyang:http://timyang.net/data/redis-misunderstanding/
A few days ago Weibo had a large system failure, many technical friends are more concerned about, the reasons for this will not exceed James Hamilton in the designing and
The first step is to modify the configuration file
############################# EVENT NOTIFICATION ############################### Redis can notify Pub/sub clients about events happening in the key space.# This feature was documented at
Redis most commonly used data types are the following five: String Hash List Set Sorted set
Before describing these types of data, let's take a picture of how these different data types are described in Redis internal memory management:
First,
Redis is used as a cache in the most recent project, and the database is MongoDB. Project uses spring and everything works without introducing Redis, but add in Pom.xml:
org.springframework.boot
Spring-boot-starter-
Step reference:
Click on the Open link http://jingyan.baidu.com/article/9113f81b0333e12b3214c7a8.html
Redis for Windows download address:
Click on the Open link https://github.com/MSOpenTech/redis/releases
Phpredis Download Address:
Version:
The rich data structure makes the design of Redis very interesting. Unlike relational databases, Dev and DBAs require deep communication, review each line of SQL statements, and unlike memcached, do not require DBA involvement. Redis DBAs need to be
Using clusters
The main record is the operation of learning Jedis. third, add new nodes to the cluster
Depending on the newly added node type, there are 2 ways to add new nodes to the cluster.
1: If you add a new node that is a master, then we
Expiration time of keys
Typically, the Redis keys are created without setting the associated expiration time. They will always exist unless you use the displayed command to remove them, for example, by using the Del command.
Expire a class of
Redis Introduction
Redis essentially a key/value database, similar to the memcached NoSQL database, but his data can be persisted on disk, solve the service restart after the data is not lost, his value can be string (string), Lists (list), sets
implementation of distributed lock based on Redis
backgroundAccording to Redis's SETNX command, only one client can get the lock; the Redissonlock distributed lock implementation uses the LUA script, which provides a method that does not apply to
In configuration file redis.conf, the default bind interface is 127.0.0.1, which is the local loopback address. In this case, access to the Redis service can only be connected through a native client, not through a remote connection,
This avoids
DISCARD
Cancels the transaction, discarding all commands within the transaction block.If you are using the Watch command to monitor a (or some) key, then canceling all monitoring is equivalent to executing command unwatch.Available
Overview
Redis-sentinel is a highly available (HA) solution that is officially recommended by Redis, and if Master is down, the Redis itself (including many of its clients) does not implement automatic primary and standby switching when using Redis
Introduction
The official website publishes the data: reads the speed is 110,000 times/s, writes the speed is 81,000 times/s
Redis is a key-value storage system. Similar to memcached, it supports storing more value types, including string (string),
Realization of session sharing based on Redis cluster
Spring-data-redis support for Redis cluster password from version 1.8.0
Cosmic Conventions first on code
1. Maven Dependency Configuration
1.2.0.RELEASE 1.8.0.release 2.9.0 org.spri
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.