tencent cloud

Tencent Cloud Distributed Cache (Redis OSS-Compatible)

DokumentasiTencent Cloud Distributed Cache (Redis OSS-Compatible)

Instance and Key Naming Rules

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-09-07 14:45:19
Diterjemahkan & Diperiksa oleh AI

Overview

When the number of instances grows to dozens or even hundreds and the total number of Keys reaches tens of millions, the lack of a unified naming system leads to reduced troubleshooting efficiency, permission management errors, and unclear resource ownership. Standardized naming rules are defined in this document from two dimensions: instance naming and Key naming, enabling team members to directly identify the environment, business, and region to which a resource belongs by its name.

I. Instance Naming Rules

A standardized instance name can directly convey the ownership information of an instance in console lists, monitoring dashboards, and alarm notifications, helping Ops personnel quickly locate target instances and reduce the risk of misoperation. It is recommended to name instances by concatenating the four dimensions of environment, organization, business, and location with hyphens -:
{environment}-{branch}-{project-group-id}-{business-name}-{region}-{zone}-{sequence-number}
The meanings of the fields are as follows:
Field
Description
Example
Environment
Distinguish between production and development environments to prevent misoperations from affecting online services.
prd (production), dev (development)
Branch
Abbreviation of the affiliated branch company name for cost allocation and permission management.
cx (property insurance)
Project group ID.
Unique identifier for the project group, facilitating resource usage statistics at the team level.
p001
Service name.
The specific business served by the instance, using a meaningful English abbreviation.
ordercache (order cache)
Region
Abbreviation of the instance deployment region, consistent with Tencent Cloud region codes.
gz (Guangzhou), sh (Shanghai)
Zone
Abbreviation of the zone to which the instance belongs.
gzcx01
No.
Sequence number of the instance under the same business, used to distinguish multiple instance deployments.
1,2
Correct example
Example
Description
prd-cx-p001-ordercache-gz-gzcx01-1
A production environment instance for the order cache of the P001 project in the property insurance department, deployed in the Guangzhou Property Insurance 01 zone.
dev-cx-p001-ordercache-gz-gzcx01-1
The development environment instance corresponding to the previous entry
prd-cx-p002-policysync-sh-shcx01-1
A production environment instance for the policy synchronization of the P002 project in the property insurance department, deployed in the Shanghai Property Insurance 01 zone.
Incorrect example
Example
Issue
redis-01
Missing key information such as environment and business context, making it impossible to determine ownership.
Production-Property Insurance-Order
Using Chinese characters for naming can easily cause encoding issues in consoles and scripts.
prd_cx_p001
Uses underscores as separators, which is inconsistent with the standard hyphenated style.

II. Key Naming Rules

It is recommended that Key names adopt a structure with the business name as the prefix and colons for layering. This approach prevents Key conflicts between different businesses and enables Keys to be self-descriptive, allowing their associated business systems and data sources to be identified directly from their names. Use the following naming format:
business-name:database-name:database-table-name:data-id
The meanings of the fields are as follows:
Field
Description
Example
Business name.
Abbreviation of the business system, serving as the globally unique namespace prefix
cx (property insurance)
Database name.
The name of the database from which the data originates, facilitating traceability.
orderdb (order database), userdb (user database)
Database table name.
The name of the table corresponding to the data, pinpointing the specific data entity.
order (order table), user (user table)
Data ID.
The primary key or unique identifier in a data table, pinpointing a single record.
202401150001,100238
Correct example:
Example
Description
cx:orderdb:order:202401150001
Order record in the property insurance order database, with order number 202401150001.
cx:userdb:user:100238
User record in the property insurance user database, with user ID 100238.
Incorrect example:
Example
Issue
000110011
No prefix or hierarchy, making it impossible to determine business ownership and data source.
cx_cxdb_user_000110011
Uses underscores to separate levels, which is inconsistent with the colon-based hierarchical naming convention.
cx:cxdb:cxdb_user_info:000110011
The table name redundantly contains the database name "cxdb", which is redundant and increases the Key length.
Note:
It is recommended to keep Key names within 128 bytes. Excessively long Keys consume additional memory and increase the overhead of comparison and hash calculation in high-concurrency scenarios.
For more detailed design guidelines on Key naming character sets, type suffixes, big Key avoidance, and more, see Key and Value Design Principles.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan