Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Redis is installed and set up Ubuntu 14.04 from the environment under the main ssdb     - MongoDB in bulk timestamp change the date format (Database)

- Linux process management related content (Linux)

- C # socket udp broadcast (Programming)

- JavaScript in null undefined summary (Linux)

- X security settings in Ubuntu (Linux)

- Python control multi-process and multi-threaded concurrency (Programming)

- Linux dd command make U disk boot disk (Linux)

- Spring inject a type of object to enumerate (Programming)

- What Java 8 fastest garbage collector (Programming)

- CentOS7 installation performance monitoring system (Server)

- Ubuntu install driver manager Mint Driver Manager and Device Driver Manager (Linux)

- Java implementation chain store binary search tree (recursive method) (Programming)

- Git you do not know about some of the things (Linux)

- Hunk / Hadoop: Performance Best Practices (Server)

- When should I use Angular 2 (Programming)

- MongoDB3.0.6 wiredtiger MMAPv1 (Database)

- The Linux kernel and AVL tree in red-black tree (Programming)

- The istgt PSD on ported to Mac OS X (Linux)

- linux smartd [FAILED] appears at startup (Linux)

- ORA-01000 Solution (Database)

 
         
  Redis is installed and set up Ubuntu 14.04 from the environment under the main ssdb
     
  Add Date : 2018-11-21      
         
         
         
  Exposure at work to redis, Redis is a very efficient key-value database, widely used in the project, but it is obvious shortcomings redis for memory processing in the project at the beginning of the line, you must memory planning and reasonable, otherwise memory is prone to burst phenomenon, generally more reasonable amount of memory for the computer's physical memory 3/5.

redis provides a variety of data types, I often use a string, hash, list, set, sorted set, to meet the basic requirements of the project for the data type. We are using redis Java client, providing a series of commands for redis corresponding api. redis persistence provides a variety of strategies, but we do not have the persistence, under their own research, AOF is the most reliable way of feeling, principle and mysql binary log is very similar to the operation information is recorded written document, to read the log from the server and perform operations.

In the usual network development you may often need to adjust the data storage details, so if the previous data is still resident in memory, cause a lot of features not work properly, so after adjustment details, you need to redis database flushdb operation.

redis and ssdb very suitable for use in certain scenarios, such as some data can only remain in the database for 2 minutes, similar to the YY channel T person, after fixing a few minutes to come in, you can use the command setex key seconds value, then determine whether the expired You can exists key command.

redis commonly used commands website: http: //redis.readthedocs.org/en/latest/ covers redis command and demo.

Before take ssdb said redis, because ssdb very good compatibility of the redis api. Redis is a good substitute.

ssdb relative to redis there is a lot of advantages: redis 100 times the capacity of a database that can store the amount of billions of data. Redis relatively speaking, occupy very little memory. So he is to download the ssdb, the following are ssdb build process.
Environment: Ubuntu 14.04

Virtual machine A: 192.168.1.251

VM B: 192.168.1.252

Gateway: 192.168.1.1

My two virtual machines are respectively mounted on different physical machines, but are used in a bridging mode, ip ip addresses are in the same segment.

Online are installed under ssdb in two virtual machines, respectively.

wget --no-check-certificate https://github.com/ideawu/ssdb/archive/master.zip

unzip master

cd ssdb-master

make

sudo make install

These can be found in ssdb official website, http: //www.ideawu.com/ssdb/zh_cn/.

ssdb from the main building is actually very simple, you just need to find ssdb.conf in two virtual machines ssdb installation directory.

sudo vi ssdb.conf

ip modify server virtual machine under the default IP address.

Virtual Machine A:

server:

ip: 192.168.1.251

port: 8888 // I did not change the port, use the default

Virtual machine B:

server:

ip: 192.168.1.252

port: 8888

This is the basic configuration.

Now as long as the basis for the next ssdb.conf A Configuration:

replication:

slaveof:

# To identify a master even if it moved (ip, port changed)

# If set to empty or not defined, ip: port will be used.

id: svc_2

# Sync | mirror, default is sync

type: sync

ip: 192.168.1.252

port: 8888

Note: In the above configuration, do not use the spacebar to use tab.

You can now start the ssdb.

./ssdb-server ssdb.conf

Then you can use the command line tools provided ssdb to operate.

Virtual machine A: ./ssdb-cli -h 192.168.1.251 -p 8888

VM B: ./ssdb-cli -h 192.168.1.252 -p 8888
     
         
         
         
  More:      
 
- Python type way of comparison (Programming)
- Execute command sentence can result in equipment permanently bricked in Linux laptop (Linux)
- To teach you a trick to find the real IP address (Linux)
- Introduction to Linux system process monitoring tools (Linux)
- Java to achieve local fileCopy (Programming)
- Linux System Administrator common interview questions and answers 30 (Linux)
- Linux Command Study Notes (Linux)
- Smack 4.1.x Upgrade Guide (Linux)
- To learn linux security (Linux)
- Caffe install under Ubuntu 14.04 64bit (Linux)
- Use IP address spoofing Intrusion Prevention Firewall (Linux)
- Git version rollback (Linux)
- Try the command ip, ifconfig is obsolete under Linux (Linux)
- 12 Linux Process Management Commands (Linux)
- Debian 7.8 system installation and configuration process (Linux)
- Android design patterns - state mode (Programming)
- Several reasons MySQL garbled (Database)
- STL source code analysis - iterator each container classification (Programming)
- CentOS7 virtual machine settings, and bridging problems (Linux)
- Java is simple to read and write HDFS Demo (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.