At the outset, to save the server, MongoDB and Redis are placed on a server. Every peak of the website special card, also often appear 502. Find the reason, found that hard disk writing data is very large, IOPS is very high, and then carefully study
First, test environment in Ubuntu Kylin 14.04 64bitMySQL, Redis, PHP, lib_mysqludf_json.so, Gearman have been installed.Click here to view the test database and table referenceThis article also has some basic operations, which are described in the
After you've installed MongoDB, you can try running the JavaScript shell.Under Mac, from the installation to the shell that can run MONGO, the steps are as follows:1. Find the website of MongoDB. Download the appropriate installation package. such
The following is how the Linux Open port command is used.Nc-lp & (Open 23 port, Telnet)Netstat-an | grep 23 (see if 23 ports are open)When you do Redis, you want to boot from the 6379 port: (Essentially, the service you want to start the port from)1.
Memcached
Redis
Persistence of
Not supported
Support
Distributed
Support
Support Master-SlaveInvolves complex operations that may require a distributed lock to support
Thread
The previous article said redistemplate support for annotation transactions, as well as the provided serializer.The transaction needs to open Enabletransactionsupport, and then use @transactional annotations, which directly through the callback
Installing Redis under Windows1. Introduction to RedisRedis is a key-value storage system. Similar to memcached, it supports storing more value types, including string (string), list (linked list), set (set), Zset (sorted set-ordered collection),
Directory1. Working principle of replication2. How to configure Redis master-slave replication1. Working principle of replicationAfter the slave is started and connected to master, it will actively send a sync command. Master will then start the
RDIs and jquery are purely for applications, and here is a primer on CentOS 5.7:1.Redis IntroductionRedis is a key-value storage system. Similar to memcached, but solves the situation where the data is completely lost after a power outage, and she
The transaction needs to open Enabletransactionsupport, and then use @transactional annotations, which directly through the callback connection, do not need to do their own multi and exec transaction open commit. But the callback to get connection,
1.Zipmap optimized Hash:The previous talk of storing an object in a hash type consumes less memory and makes it easier to access the entire object. The reason for saving memory is that when a new hash object is created, it is stored with zipmap.
Say Business First,In the Flatmap phase, the current indicator will be in Redis to verify whether the data is a new user, if it is a new user, then statistics, statistics will add the new user to our Redis container ...This business is actually very
Strings
The simplest type, a key corresponding to a value,string type is binary safe. A Redis string can contain any data, slice, or serialized object
Operation
Set: Sets the value of the key corresponding to a string
Redis Hash is a string-type field and value mapping table. Its addition, delete operations are O (1) (average). Hash is particularly useful for storing objects. there is a single string type compared to each field of an object. Storing an object in
The Redis version installed is redis-3.0.2Please follow these steps strictlyYou can exempt the following errors1 Make[2]: Cc:command not foundException reason: GCC is not installedSolution: Yum Install gcc-c++2 Redis service does not support
Three Delete policies:
Timed Delete: When setting the expiration time of the key, create a timer (timer), let the timer at the expiration time of the key to temporarily, perform the delete operation of the key immediately.
Lazy Delete:
Server: Redis version of the operating environment, the production environment is full memory run.Client NuGet Introduction: Servicestack.redisAdd the Cache code: //Set///// Type // Key // Value // How many
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