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.
The-redis of distributed storageRedis is commonly used for database read caching and write caching, usually write caching needs to consider the problem of data consistency, read cache application moreRedis is an open-source, Key-value database that
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
First, the installation of Redis-server
Since I am using the Ubuntu system for my current web machine, here is an example of Ubuntu, which can be installed directly using apt source redis-server
$ sudo apt-get install Redis-serverAfter the
A String type
First use the Start server process:
Redis-server.exe
1. Set
The value of the SET key corresponds to the string type.
Example: Inserts a record of a data type string into the Redis database.
To enter a command on the client:
Summary one:
Memcache official definition
Free & Open Source, High-performance, distributed memory object caching system, generic into nature, but intended for us E in speeding up dynamic Web applications by alleviating database load.
Redis
First, RDB Redis DataBaseThe RDB persistence performs point-in-time snapshots of your dataset at specified intervals.Writes a snapshot of an in-memory dataset to disk at a specified time interval, which is the jargon-snapshot snapshot, which
Guide
Both Redis and Memcache are memory-based data storage systems. Memcached is a high-performance distributed memory caching service; Redis is an open source Key-value storage System. Similar to memcached, Redis stores most of the data in
Jedis transactionsWhen we use JDBC to connect to MySQL, we need to open the transaction every time we execute the SQL statement; in MyBatis,You also need to use opensession () to get the session transaction object for SQL execution, query, and so on.
Just say the question.Dependency Packages: Jedis 2.9.0, Spring-data-reids 1.4.1Tip: Redis.clients.jedis.JedisShardInfo.setTimeout (I) V not found.Reason:Seemingly Jedis 2.6.2 after the Jedisshardinfo class "timeout" parameter changed to "SoTimeout".
1. Installing RedisHttps://redis.io/downloadInstall Redis in the D:\Program Files\Redis\ directory, copy the EXE executable to the current bin directory, and then configure the system environment variables.2. Install
Redis Implements distributed locksIn the cluster and other multi-server often to use to synchronize the business, then the ordinary transaction is to meet the needs of the business, the need for distributed locks. Distributed locks are implemented
When it comes to Redis's Dict (dictionary), although the algorithm is no different from the general Dict implementation in the market, there are 2 special places in Redis's dict that is its rehash (re-hash) and its dictionary node one-way list.Here
Reference Links: https://www.sebug.net/vuldb/ssvid-89715In the case of unauthorized access to Redis, an attacker can take advantage of the methods of Redis to successfully write their public key to the Authotrized_keys file of the/root/.ssh folder
Redis Data typesRedis supports five types of data: string (String), hash (hash), list, set (set), and Zset (sorted set: Ordered set).String (String)The string is the most basic type of redis, and you can understand it as a type that is identical to
1.The best way to network is to bridge. I used "Network address translation (NAT)", resulting in the virtual machine with the command ifconfig to get the IP is 10.0.2.15, a strange feeling, and then on the real machine has not been connected. Some
1. Download the redis file in windows, decompress it, and put it in a directory to enable the redis package download.Redis-server.exe redis. conf // enter redis directory to enable redis Service Command2. Restart a cmd command window to start
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