High availability of databases has always been a concern because of the possibility of machine failure and other unexpected accidents. As a NOSQL database, TcaplusDB provides scalability and high availability in cross-data center scenarios. This document describes how to deploy TcaplusDB in two data centers in the same city.

TcaplusDB high availability technology principle

All Tcaplus service modules support high availability deployment

One by one:

  1. MySQL: Use the original MySQL Cluster Cluster or the cloud provider’s MySQLdb. It is recommended to configure domain name access
    1. (Deployment mode: Refer to the Internet for deployment mode)
  2. OMS: You can set up multiple OMS management terminals, which are equal and do not affect each other
    1. (Deployment mode: To add new machines after Mysql privileges, install xampp, loose the OMS package, execute. / install_web. Sh was introduced into the Mysql connection information as a parameter, once installed delete/data/tcaplus/tcapoms/WWW/app/install. PHP initial page, Normal use)
  3. Tcapcenter: Each cluster (set) has one ServingCenter. StandbyCenter can be deployed to monitor the status of multiple ServingCenters in one-to-many mode. Once the ServingCenter is confirmed to be faulty and unavailable, roles can be switched within a few minutes. Take over the subordinate processes of the original ServingCenter
    1. (Deployment mode: After adding Mysql permissions for the new machine, register the new cluster from “Cluster Maintenance”, then use the document “Install StanbyCenter”)
  4. Tcapdir: At least two Tcapdir are deployed in each cluster (set). Each Tcapdir has a complete directory server list. If the Tcapdir that is being connected fails, the client automatically selects other surviving Tcapdir from the list for connection, facilitating the capacity expansion of daily processes
    1. (Deployment mode: grant Mysql permission to Tcapdir first, and then initialize Tcapdir to the pool)
    2. , fill in the login information, and put the machine into the pool. For details, refer to the chapter on machine shelving
    3. Click on directory services
    4. Click “Add Directory Service”
    5. Click Submit. After installation, tCAPdir completes expansion
  5. Tcapsvr: Storage tiers are configured with one master and one slave. Master-slave), under normal circumstances, the Master undertakes the DB read/write requests. When the Master fails, the Proxy will soon know the problem (internal statistics, within a certain period of time, the request sent by the Proxy to the Master does not receive the response). When the switching conditions are met, Slave will be notified to switch its role to Master, and the routing table will be adjusted. After the switching is complete, Tcaproxy will be notified to update Master information
    1. (Deployment mode: See Storage Tier Capacity Expansion.)
  6. Tcaproxy: At least two TCAProxies are deployed in each game zone to balance requests at the client. Expanding Tcaproxy can enhance throughput capacity. When Tcaproxy process is abnormal and the Center senses heartbeat interruption, it will notify the client to update the Proxy list (excluding abnormal processes) through Tcapdir.
    1. (Deployment mode: See Capacity Expansion at the Access Layer.)
  7. Tcapdb: Each service (App) has at least two TCAPdbS deployed. The Tcapsvr balances requests from multiple TCAPdbS when forwarding cached data. Expanding the Tcapdb capacity enhances the throughput capability
    1. (Deployment mode: See Cache Layer Capacity Expansion)
  8. Cold Spare center (Gluster) : The storage cluster is in RAID-1 mode. When a faulty storage device fails, services are not affected. Automatic data recovery can be initiated after the faulty storage device is replaced or hard disks are repaired
    1. (Deployment mode: Refer to The Data Backup chapter, which includes Gluster O&M management and node expansion.)

TcaplusDB is a distributed NoSQL database produced by Tencent. The storage and scheduling code is completely self-developed. It has features such as cache + ground fusion architecture, PB-level storage, millisecond delay, lossless horizontal expansion and complex data structure. At the same time, it has the characteristics of rich ecology, convenient migration, extremely low operation and maintenance cost and five nine high availability. Customers cover gaming, Internet, government, finance, manufacturing and Internet of Things and other fields.