Sohu video Redis private cloud platform CacheCloud

Source: Internet
Author: User
Tags ssh port redis cluster

Sohu video Redis private cloud platform CacheCloud
I. What does CacheCloud do?

CacheCloud provides a Redis cloud Management Platform: Implements multiple types (Redis Standalone, Redis Sentinel, Redis Cluster) automatic deployment solves the fragmentation of Redis instances, provides comprehensive statistics, monitoring, and O & M functions, reduces O & M costs and misoperations for developers, improves machine utilization, and provides flexible scalability, convenient Client Access

Ii. What functions does CacheCloud provide?
  • Monitoring Statistics: provides monitoring and statistics interfaces for machine, application, and instance dimensions.
  • One-click enabling: three types of applications are Redis Standalone, Redis Sentinel, and Redis Cluster. You do not need to manually configure initialization.
  • Failover: Supports the high-availability mode of sentinel and clusters.
  • Scaling: provides comprehensive Online vertical and horizontal scaling functions.
  • Complete O & M: provides automatic O & M and simplified O & M functions to avoid manual O & M errors.
  • Convenient client: convenient and quick client access.
  • Metadata Management: Provides machine, application, instance, and user information management.
  • Process-oriented: provides complete processing processes such as application, O & M, scaling, and modification.
Iii. What problems does CacheCloud solve?

1. deployment costs

Redis multi-host (Redis-Sentinel, Redis-Cluster) deployment and configuration are relatively complicated and error-prone.
For example, if a redis-cluster consisting of 100 redis data nodes is manually installed, it is time-consuming and error-prone.

2. instance fragmentation

As a Redis Administrator (which can be seen as a redis DBA), developers need to manage hundreds of Redis-Cluster clusters distributed on hundreds of machines. Manual maintenance costs are high and automatic O & M tools are required.

3. Incomplete monitoring, statistics, and management

Some open-source Redis monitoring and management tools, such as RedisLive (Python) and Redis Commander (Node. js), Redmon (Ruby), regardless of the comprehensive functions (such as configuration management, support for Redis-Cluster, etc.), the scalability is difficult to meet the needs.

4. O & M costs

Redis users need to maintain their own Redis, but users may be better at using Redis to implement various functions, but they do not have enough energy and experience to maintain Redis. Redis developers, like using Mysql, do not need to maintain the Mysql server or use the Redis service, redis is maintained by more experienced personnel in Redis O & M (high availability and scalability), so that developers are more concerned with Redis usage.

5. scalability

This product supports Redis's latest Redis-Sentinel and Redis-Cluster, which not only meets the high availability of Redis, but also meets the scalability of Redis, and has strong capacity and performance scaling capabilities.

6. Economic Cost

The machine utilization rate is low, and Redis of various project teams is deployed on their respective servers, resulting in a large amount of idle resources not being effectively used.

7. inconsistent versions

Redis of each project uses different versions, which is not convenient for management and interaction.

Iv. value provided by CacheCloud
  • Automatic large-scale O & M: reduces O & M costs and reduces the error rate of manual operations.
  • Free Scaling: provides flexible scalability, reduces application resizing costs, and reuse machine resources.
  • Team improvement and open-source contribution: Improve cloud product development and design experience, as a developer and user, Eating your own dog food.
5. Scale of CacheCloud in Sohu
  • Over 100 million command calls per day
  • 2 TB + memory space
  • 800 + Redis instances
  • 100 + machines
Vi. CacheCloud environment requirements
  • Java 7
  • Maven 3
  • MySQL
  • Redis 3
VII. CacheCloud Quick Start1. initialize the database

Import cachecloud. SQL in the project to initialize the database and table structure. The admin super administrator is inserted by default.

2. CacheCloud project configuration

Maven is used as a tool for project construction. The local. properties and online. properties configurations are provided as test and online isolation. Attribute configuration description:

Attribute nameDescriptionExampleCachecloud. db. urlmysql driver urljdbc: mysql: // 127.0.0.1: 3306/cache-cloudcachecloud.db.usermysql username admincachecloud. db. passwordmysql password admincachecloud. machine. username: the Server username, used for ssh $ {your machine username} cachecloud. machine. password server password, used for ssh $ {your machine password} web. portspring-boot embedded tomcat startup port 80803. Start the cachecloud system.

(1) local startup: run in the cachecloud-web module

 mvn spring-boot:run

(2). Production Environment

1. build: mvn-Ponline clean package 2. upload the war package to a specific directory, such as/opt/cachecloud-web 3: copy the cachecloud-web-1.0-SNAPSHOT.conf configuration to the/opt/cachecloud-web directory, note that it must be in the same directory with the war package to take effect 4. started as a linux service: sudo ln-s/opt/cachecloud-web/cachecloud-web-1.0-SNAPSHOT.war/etc/init. d/cachecloud-web/etc/init. d/cachecloud-web start

(3). login confirmation

  • A) Access: http: // 127.0.0.1: 9999
    (9999 is the tomcat port number)
  • B) if the access is normal, use the User name: admin and password: admin to access the system and go to the Application List:
4. Add a machine

(1). Run the script:
The cachecloud-init.sh script in the cachecloud project is used to initialize the cachecloud environment of the server, the main work is as follows:

  • A ). create a cachecloud project User: because some features of the cachecloud Project (redis startup and server monitoring) are completed through ssh, the user and password here must correspond to those in the project, for details, see section 3.
  • B) Create the working directory, data directory, configuration directory, log directory, redis installation directory, and temporary directory of the cachecloud project.
    (/Opt/cachecloud/data,/opt/cachecloud/conf,/opt/cachecloud/logs,/opt/cachecloud/redis,/tmp/cachecloud)
  • C) install the latest release version of Redis

(2). Script Execution

  • (A). Use root to log on to the target server.
  • (B). Copy the cachecloud-init.sh script to the current user directory of the target server.
  • (C). Execute sh cachecloud-init.sh $ {yourusername}
  • (D). Confirm the password twice
  • (E). Install all the way until the installation is successful.

(3). Suggestions and warnings

  • (A) run the initialization script under the root user because the initialization script involves high permissions such as user creation.
  • (B). For security reasons, it is best not to have an Internet IP address on the selected machine.
  • (C). Do not use cachecloud as the username and password. The password should be as complex as possible.
  • (D) The ssh port of the machine is preferably 22.
  • (E) Make sure that/opt/has sufficient hard disk space, because/opt/cachecloud/data must store the persistent files of RDB and AOF. If the hard disk is too small, the persistence will fail. (If the hard disk is really small, it is recommended to create a soft link to/opt/cachecloud/data, and ensure that the soft link directory is also username user, be sure to ensure the directory structure of/opt/cachecloud)
  • (F). The redis-3.0.6 is currently used in the script. If necessary, replace it by yourself. We recommend that you use a version later than 3.0 release.

(4). Add a machine
Go to the administrator interface (http: // ip: port/manage/total/list), go to machine management, and click Add machine. Adding Machine information is the basis for application activation.

Sohu's brothers also recorded a video tutorial, really open source conscience works: http://my. TV .sohu.com/pl/9100280/index.shtml

Source: https://www.ttlsa.com/redis/sohu-tv-cachecloud-redis/author: ttlsa

Address: http://www.linuxprobe.com/sohu-tv-cachecloud

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.