To better understand the Redis protocol, we use PHP to implement a client class that supports most of the commands.
Redis's agreement can refer to this article http://redis.cn/topics/protocol.html
The code is as follows:
namespace Xtgxiso;Class
Redis as a high-speed database, on the Internet, must have a corresponding security mechanism to protect.
1. A more secure approach is to use an IP-bound approach for control.
The code is as follows
Copy Code
Bind 127.0.
Recent projects need to use Heka to deal with Redis data, then the problem is, how can it be achieved? The Redis plugin needs to be installed on the Heka.1. Start adding the Heka-redis plugin to the compiler plug-in add-in.cd/usr/local/heka/Vim
First, copy basic configuration and demo
In order to avoid a single point of failure, Redis provides a copy function that enables the process of automatic synchronization.
1, configuration
The data after synchronization is divided into two
Recently saw the Redis automatic Failover Sentinel (Sentinel), so take notes at the second placeNote that in the real world, multiple machines, this article is just testing, so configure multiple Redis instances on a single machine to achieve the
The social product business has many statistical counting functions, such as:
Users: The total number of praise, attention, number of fansPost: Number of praise, comments, heatMessage: Read, unread, red dot message numberTopic: Reading number, post
Phpredisadmin and phpMyAdmin are similar to the web-friendly interface to data manipulation, although this article is commonplace, but it takes time to edit it.
Phpredisadmin's git address: https://github.com/ErikDubbelboer/phpRedisAdmin
[Root@yum-
Redis and memcached Two kinds of caching, personally feel redis better use, because it not only provides a wealth of data types, but also to ensure the durability of the data, the following is a simple introduction to the Redis of several commonly
Redis is an open source, with the use of ANSI C language, support network, can be based on memory can also be persistent log-type, Key-value database, and provide a variety of language APIs. From March 15, 2010 onwards, Redis's development work is
The installation can be performed directly with the PIP:
The code is as follows
Copy Code
Pip Install YUNBK
GitHub address is as follows:Https://github.com/dantezhu/yunbkAnd the usage is very simple, such as to
Method One, Zabbix monitor Redis
1, Import Template
Again, I have uploaded the template to the GitHub project. Download directly, import the template through the following steps: Click configuration----> Templates------> Import-------> Import
1, first enable the REDIS notification function (under Ubuntu operation):Edit the/etc/redis/redis.conf file to add or enable the following (expiration notification):Notify-keyspace-events Exor after logging in to REDIS-CLI, enter the following
Configuration files based on the redis2.4 version.# Note The unit problem: When you need to set the memory size, you can use a common format like 1k, 5GB, 4M:## 1k = bytes# 1kb = 1024x768 bytes# 1m = 1000000 bytes# 1MB = 1024*1024 bytes# 1g = 1000000
Redis log error: [7666] Jan 00:22:36.028 # Error Moving temp DB file on the final destination:invalid cross-device link [1 937] 00:22:36.513 # Background saving error [1937] Jan 00:22:36.614 * 1 changes in seconds. Saving ... [7679] Jan 00:27:15.659
1. Deploy two Tomcat nodes and use Nginx to implement the cluster (see http://www.cnblogs.com/zhangzhi0556/articles/nginx.html);2, Redis installation (see http://www.cnblogs.com/zhangzhi0556/articles/redis.html) 3, build a simple Web project,
Error descriptionInstalling the Redis 2.8.18 times wrong:
zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directoryzmalloc.h:55:2: error: #error "Newer version of jemalloc required"make[1]: *** [adlist.o] Error 1make[1]:
Redis cluster ConstructionFrom the official redis website, we can see that the latest stable version has been updated to 3.2.6. Here I will add a previous 3.2.0 cluster configuration.Note:
Redis 3.0 and later versions support the cluster mode. You
Many people regard redis as a database. In fact, redis is used to construct the database model, which has the taste of the database. But how to build the relationship between key and value. The root real relational database is still different. High
To use redis, you need to install the redis client and operate the redis client interface.1. Server installationApt-get install redis-serverStart Redis$ Redis-serverCheck whether Redis is working?$ Redis-cliThis will open a Redis prompt, as shown in
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.