General Questions

1. What is TcaplusDB?

The game database (Tcaplus Database, TcaplusDB) is a distributed NoSQL database designed by Tencent for games. It provides high performance, non-perception elastic scaling, millisecond read/write delay, and secure data storage services in order to support the explosive growth of game apps and massive game data management. It is widely used in hundreds of Tencent games, including "Game for Peace", "Arena Of Valor", "Cross Fire" and other high-quality games, supporting more than 40 million users' online data requests every day.

2. What scenarios are suitable for TcaplusDB?

TcaplusDB supports mobile games, PC games, and web games, as well as the deployment methods of split-server and full-server, and also supports scenarios with high concurrency and low latency access requirements in non-game fields.

3. What are the advantages of TcaplusDB compared with Redis + MySQL as the game database?

  • The TcaplusDB is deployed in combination with memory and efficient SSDS, meeting the requirements of fast data read/write and persistent storage;
  • For relational database users, TcaplusDB provides a SQL-like command line tool, Tcaplus Client, which enables users to seamlessly switch to execute CRUD operations;
  • Users do not need to worry about the slow loading of queries caused by large table files. TcaplusDB supports queries with a single table size of up to 2.56 PB without reducing the query efficiency;
  • The expansion of Redis + MySQL not only requires manual intervention and cannot meet the sudden increase of app scenarios, but also has high use costs. TcaplusDB users only need to focus on app development, while database expansion and performance optimization are all completed by professional DBAs in the background

4. How does TcaplusDB ensure data security?

  • Data disaster recovery: The master/slave nodes of the cluster are mainly deployed across IDC in the same city (or across racks and floors, and the synchronization delay of the master/slave nodes is up to 10 ms). Binlog backup is performed every 15 minutes, and full cold backup is performed every day; Each module of the entire cluster enables users to loosely upgrade and expand capacity without perception. 
  • Data consistency: synchronize the master/slave data in real time and use the req/ack mechanism to ensure complete data consistency; During the master/slave switchover, confirm that the master/slave data is consistent before the switchover; In case of failure, recovery the data based on cold standby + binlog steam rebuild to ensure data integrity; Periodically check the master/slave data in full and have an exception repair mechanism; The user request level determines whether the data operation is normal according to the response code of real-time feedback;
  • Data content security: The data landing adopts CRC verification to prevent tampering; The data file is stored by Google Snappy compression, and the data will be serialized and deserialized after read/write compression or decompression. Even if the data file is hijacked, the data content cannot be parsed;
  • Access security: Integrate Tencent Cloud user access management system (CAM); TcaplusDB background supports access based on an IP white list, that is, specifying IP clients to read and write TcaplusDB data; the data interaction in the table group requires password verification, and all user operations have audit logs;
  • External compliance: data files will be encrypted with aes-128-cbc, meeting the EU GDPR standard.

5. Field size limit of each version of TcaplusDB API

  • For APIs less than Tcaplus 3.32.0, the size limit of a single value field is 128 KB, and a single record is 256 KB
  • For APIs greater than Tcaplus 3.32.0 and less than Tcaplus 3.40.0, the size limit of a single value field is 256 KB and a single record is 1 MB
  • For APIs greater than Tcaplus 3.40.0, the size limit of a single value field and a single record is 10 MB

6. What are the size of the send buffer and receive buffer of TcaplusDB at present?

  • At present, the send and receive buffers for gameserver and single tcaproxy are each 10 MB.

8. How to use the error code of the batch interface?

The error code of batch interface is divided into two types: whole error code and sub-operation error code. When at least one sub-operation is successful, the whole error code is successful; When all sub-operations fail, the whole error code is failure. The whole error code can be obtained from the return value of the response, and the sub-operation error code can be obtained from the return value of a single record.

9. Is the maximum number of first-level fields in the tcaplus table 256?

Currently, a table supports up to 256 first-level fields

10. How many connections can tcaplus support for a game

Each proxy has a limit on the number of connections and can provide up to 3000. Generally, the api can connect up to 200 proxies, and the maximum total number of connections in a single zone is 200 * 3000 (the default is 3000. The access process can be configured to be larger, as long as the memory is large enough)

11. Is Tcaplus accessing the database in parallel?

It supports parallelism. The requests for each connection (session) on the API side are serial, and different connections are parallel. On the API side, the connection is not thread-safe. There is no need for multiple threads to use the same connection

12. How much data can a shard store?

A shard can store a maximum of 256 GB of data. It is recommended that the maximum amount of data be kept within 10 GB. Note: There is an initial space for the shard, but it is not fixed. It depends on the table engine parameters that are set, such as the number of hash buckets.

13. How compatible is the pb version of TcaplusDB with different versions?

Pb is back-and-forth compatible

results matching ""

    No results matching ""