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:
- MySQL: Use the original MySQL Cluster Cluster or the cloud provider’s MySQLdb. It is recommended to configure domain name access
- (Deployment mode: Refer to the Internet for deployment mode)
- OMS: You can set up multiple OMS management terminals, which are equal and do not affect each other
- (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)
- 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
- (Deployment mode: After adding Mysql permissions for the new machine, register the new cluster from “Cluster Maintenance”, then use the document “Install StanbyCenter”)
- 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
- (Deployment mode: grant Mysql permission to Tcapdir first, and then initialize Tcapdir to the pool)
- , fill in the login information, and put the machine into the pool. For details, refer to the chapter on machine shelving
- Click on directory services
- Click “Add Directory Service”
- Click Submit. After installation, tCAPdir completes expansion
- 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
- (Deployment mode: See Storage Tier Capacity Expansion.)
- 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.
- (Deployment mode: See Capacity Expansion at the Access Layer.)
- 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
- (Deployment mode: See Cache Layer Capacity Expansion)
- 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
- (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.