Familiar with the installation and use of Redis and Redis in Windows

Source: Internet
Author: User
Tags cassandra download redis riak hypertable couchdb
Before introducing redis, NoSQL, notonlysql, is a non-relational data storage with keyvalue key-value pairs. Existing NosqlDB products: redis?dbmemcachedhbasecassandratokyocabinetvoldemortdynomiteriakcouchdbhypertableflaretinl

Before introducing apsaradb for redis, I would like to know about NoSQL, that is, not only SQL, which is a non-relational data storage and key-value Pair storage. Existing Nosql DB products: Redis/MongoDB/Memcached/Hbase/Cassandra/Tokyo Cabinet/Voldemort/Dynomite/Riak/CouchDB/Hypertable/Flare/Tin/L

About NoSQL

Before introducing redis, I 'd like to know NoSQL, that is, not only SQL, which is a non-relational data storage and key/value pair storage. Existing Nosql DB products: redis/MongoDB/Memcached/Hbase/Cassandra/Tokyo Cabinet/Voldemort/Dynomite/Riak/CouchDB/Hypertable/Flare/Tin/Lightcloud/KiokuDB/Scalaris/Kai/ThruDB, and so on ~~~

Why do we need NoSQL non-relational databases?

Redis Introduction

Why does Redis have Membercache and various databases? Redis is generated purely for applications. It is a high-performance key-value database. The emergence of redis largely compensates for the shortage of keyvalue storage such as memcached. The Hong Kong virtual host has completely lost data after power disconnection; in some cases, relational databases can be well supplemented. The performance test results indicate that the SET operation can be up to 110000 times per second, and the GET operation can be performed 81000 times per second (of course, different server configurations have different performance ).

Redis currently provides four data types: string, list, set, and zset (sorted set ).

Redis storage is divided into three parts: memory storage, disk storage, and log files. The configuration file contains three parameters for configuration.

Install and use Redis in Windows

First download redis online, I downloaded a redis-2.0.2, I decompressed to the same directory as installing python, enter the redis-2.0.2, the following files:

Daemon boot program for redis-server.exe redis Server
Redis. conf redis configuration file
Redis-cli.exe redis command line tool. Of course, you can also use telnet to operate based on its plain text protocol.
Redis-check-dump.exe local database check
Redis-check-aof.exe Update log check
Redis-benchmark.exe performance testing to simulate sending M SETs/GETs queries simultaneously by N clients (similar to Apache's AB tool)

Benchmark tool test information:

Sends 0.1 million requests to the redis server, each with 60 concurrent clients

Oh, my computer is a little overwhelmed, but it still shows that 4.03 requests have been tested in 0.1 million seconds, Hong Kong Space,

Some results are as follows:

Start redisservice (conf file to define the configuration file (redis-server.exe redis. conf). If not specified, the default value is ):

The cmd window must be open all the time. When it is closed, the Redis service will be closed.

When the service is enabled, another cmd window is opened, and the website space is set to the client:

C: \ redis-2.0.2> redis-cli.exe-h 127.0.0.1-p 6379

Then we can enter the command we want to enter here. A very important operation of redis is set and get.

The client is as follows:

In this case, the server (which is also a local machine) is shown as follows (a client is connected ):

The key set on the client is resident memory, that is, the window is closed. The value of the get key in the next window is still "jzhou.

(During the operation, the server must enable the Service; otherwise, the client cannot be connected .)

Redis provides clients in multiple languages, including Java, C ++, and python.

Python operations on redis

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.