Sohu Video Redis Private cloud Platform Cachecloud

Source: Internet
Author: User
Tags ssh port redis cluster

First, Cachecloud is what to do

Cachecloud provides a Redis cloud management platform that automates deployment of multiple types (Redis Standalone, Redis Sentinel, Redis Cluster), solves Redis instance fragmentation, provides complete statistics, monitoring, operational capabilities, Reduce developer operational costs and misuse, increase machine utilization, provide flexible scalability, and provide convenient access to clients

Ii. What functions are provided by Cachecloud
    • Monitoring statistics: Provides the monitoring and statistic interface of each dimension data in machine, application and instance.
    • One-click on: Redis Standalone, Redis Sentinel, Redis cluster three types of apps, no manual configuration initialization required.
    • Failover: Supports Sentinel, cluster high-availability mode.
    • Scaling: Provides perfect vertical and horizontal on-line scaling capabilities.
    • Perfect operation and maintenance: to provide automatic operation and simplify operations and maintenance functions, to avoid pure manual operations error.
    • Convenient client: Convenient and fast client access.
    • Meta Data management: Provide machine, application, instance, user information management.
    • Process: Provide application, operation, scaling, modification and other perfect processing process
three, Cachecloud solve what problem

1. Deployment costs

Redis Multi-Machine (Redis-sentinel, Redis-cluster) deployments and configurations are relatively complex and error-prone. For example: a redis-cluster cluster of 100 Redis data nodes, which is time-consuming and error-prone if it is simply installed manually.

2. Fragmentation of Instances

As a Redis administrator (as a redis DBA), you need to help developers manage hundreds of redis-cluster clusters, distributed on hundreds of machines, with high manual maintenance costs and the need for automated operations tools.

3. Monitoring, statistics and management is not perfect

Some open source Redis monitoring and management tools, such as: Redislive (Python), Redis Commander (node. js), Redmon (Ruby), regardless of the comprehensiveness of functionality (e.g. configuration management, support Redis-cluster, etc.) , scalability is difficult to meet the needs of.

4. Operation and maintenance cost

Users of Redis need to maintain their own redis, but the user may be better at using Redis for a variety of functions, but not enough effort and experience to maintain redis. Redis developers like to use MySQL, do not need to run MySQL server, the same use of Redis services, do not own operations Redis,redis by some of the more experienced in Redis operations to maintain (guaranteed high availability, high scalability), Allows developers to focus more on Redis use itself.

5. Flexibility

This product supports Redis's newest redis-sentinel, Redis-cluster cluster, which meets Redis's high availability and can meet the scalability of Redis with strong capacity and performance scalability.

6. Economic costs

With low machine utilization, Redis for each project group is deployed on its own servers in a decentralized way, resulting in a large amount of unused resources not being used effectively.

7. Version is not uniform

Redis for each project uses a variety of different versions and is not easy to manage and interact with.

Iv. value provided by Cachecloud
    • Large-scale automatic operation and maintenance: reduce operations and maintenance costs, reduce human error rate.
    • Free Scaling: Provides flexible scalability, reduces application expansion/contraction costs, and machine resources are reused.
    • Team promotion, open source contribution: Improve cloud product development design experience, as a developer and user, Eating your own dog food.
v. The scale of Cachecloud in Sohu
    • 100+ million times a day command calls
    • 2t+ of memory space
    • 800+ a Redis instance
    • 100+ Platform Machine
Vi. Environmental needs of Cachecloud
    • Java 7
    • Maven 3
    • Mysql
    • Redis 3
Vii. Quick start of Cachecloud 1. Initialize the database

The Cachecloud.sql initializes the library table structure in the import project. Default Insert Admin Super Admin

2. Cachecloud project configuration

Using Maven as a tool for project building, the Local.properties and online.properties two sets of configurations are used as testing and on-line isolation. Property Configuration Description:

Property name Description Example
cachecloud.db.url mysql drive URL jdbc:mysq L://127.0.0.1:3306/cache-cloud
cachecloud.db.user mysql username /td> admin
cachecloud.db.password mysql secret Code admin
cachecloud.machine.username server user name, for SSH ${your Machine Username}
cachecloud.machine.p Assword server password for SSH ${your Machine Password}
web.port spring-boot inline tomcat boot port 8080
3. Start Cachecloud system

(1). Local boot: Running under the Cachecloud-web module

MVN Spring-boot:run

(2). Production environment

1. Build: Mvn-ponline clean package2. Upload the war package to a specific directory: such as/OPT/CACHECLOUD-WEB3: Copy cachecloud-web-1.0-snapshot.conf configuration to/opt/cachecloud-web directory, Note You must be in the same directory as the war pack to take effect 4. Start 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) Visit: http://127.0.0.1:9999 (9999 is Tomcat's port number)
    • b) If the access is normal, please use the user name: admin, Password: admin access system, jump to the application list:
4. Adding Machines

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

    • a). Create a Cachecloud project user: Because part of the functionality of the Cachecloud project (redis boot, server monitoring) is done via SSH, the user and password here should correspond to the project, as detailed in section Iii.
    • b). Create the working directory, data directory, configuration directory, log directory, Redis installation directory, temp directory, and so on for 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). Log on to the target server using root.
    • (b). Copy the cachecloud-init.sh script to the target server's current user directory.
    • (c). Execute SH cachecloud-init.sh ${yourusername}
    • (d). Two confirmation password
    • (e). installation until successful.

(3). Recommendations and warnings

    • (a). Execute the initialization script under root, because the initialization script involves higher permissions such as user creation.
    • (b). For safety reasons, the selected machine should not have an external IP address.
    • (c). The user name and password should not be used Cachecloud, the password is as complex as possible.
    • (d). The SSH port of the machine is preferably 22.
    • (e). Make sure that the/opt/has sufficient hard disk space, because/opt/cachecloud/data to store the RDB and aof persisted files, which can cause persistence failure if the hard disk is too small. (If the hard disk is really small, it is recommended to establish a soft link to/opt/cachecloud/data, and ensure that the soft link directory is also username users, be sure to ensure that the/opt/cachecloud directory structure)
    • (f). redis-3.0.6 is currently used in the script and should be replaced if necessary, it is recommended to use 3.0 release later.

(4). Add the machine into the Administrator interface (http://ip:port/manage/total/list), enter the machine management, click Add Machine, add machine information is the foundation of the application. Sohu Brothers also recorded a video tutorial, really is open-source conscience works: http://my.tv.sohu.com/pl/9100280/index.shtml

This article was reproduced from: http://www.linuxprobe.com/sohu-tv-cachecloud/

Free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better: http://www.linuxprobe.com/

Sohu Video Redis Private cloud Platform Cachecloud

Related Article

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.