tencent cloud

Tencent Cloud Distributed Cache (Redis OSS-Compatible)

Berita Terkini dan Pengumuman
Catatan Rilis
Pengumuman
Pengenalan Produk
Ikhtisar
Keunggulan
Kasus Penggunaan
Mesin Penyimpanan
Product Series
Performa
Pemisahan Baca/Tulis
Deployment Multi-AZ
Wilayah dan AZ
Panduan Pembelian
Ikhtisar Penagihan
Metode Pembelian
Pembayaran Jatuh Tempo
Memulai
Membuat Instans TencentDB for Redis
Menghubungkan ke Instans TencentDB for Redis (melalui Jaringan Pribadi)
Panduan Pengoperasian
Ikhtisar Operasi
Koneksi SDK
Manajemen dan Pemeliharaan Instans
Peningkatan Instans
Manajemen Deployment Multi-AZ
Pencadangan dan Pemulihan
Manajemen akun
Konfigurasi Parameter
Manajemen Akses
Jaringan dan Keamanan
Pemantauan dan Peringatan Alarm
Replikasi Global
Service Agreement
Service Level Agreement
Terms of Service
Glosarium
DokumentasiTencent Cloud Distributed Cache (Redis OSS-Compatible)

Parameter Configuration

Mode fokus
Ukuran font
Terakhir diperbarui: 2026-03-17 18:23:48
To connect to Redis via Lettuce and quickly build your client, see the table below for the recommended values of connection parameters and related connection pool configurations.
Parameter Name
Type
Default Value
Description
Recommended Value
connectTimeout
int
10s
Maximum waiting time for the client to attempt to establish a connection with Redis.
2s
commandTimeout
int
None
Timeout of Redis server response after the client sends a request.
2s
tcpKeepaliveTimeIdle
int
2h
After keepalive is enabled, the time duration the connection remains idle before the keepalive probe is sent.
30s
tcpKeepaliveTimeInterval
int
75s
The time interval between two keepalives after keepalive is enabled. The recommended value is 10s.
10s
tcpKeepaliveCount
int
9
After keepalive is enabled, the maximum number of Keepalive probes TCP should send before disconnecting the connection.
3
tcpUserTimeout
int
7875s
Maximum time TCP waits for acknowledgment before giving up retransmitting data and closing the connection.
30s
poolMaxwait
int
None
Maximum time a caller waits when no connections are available in the connection pool.
1000ms
poolMaxActive
int
8
Maximum total number of connections that the connection pool can allocate. Set this value according to specific business needs.
-
poolMaxIdle
int
8
Maximum number of idle connections allowed in the connection pool. Set this value according to specific business needs.
-
poolMinIdle
int
0
Minimum number of idle connections allowed in the connection pool. Set this value according to specific business needs.
-

application.properties Format

# Configure Host, Port, Database, and Password by one of two methods: file or code.
spring.data.redis.host=XX.XX.XX.XX
spring.data.redis.port=6379
spring.data.redis.password=XXXX
spring.data.redis.database=0

#tencent.redis.host=XX.XX.XX.XX
#tencent.redis.port=6379
#tencent.redis.database=0
#tencent.redis.password=XXXX
tencent.redis.connect.timeout=2000
tencent.redis.command.timeout=2000
tencent.redis.tcp.keepalive.time.idle=30
tencent.redis.tcp.keepalive.time.interval=10
tencent.redis.tcp.keepalive.count=3
tencent.redis.tcp.user.timeout=30

tencent.redis.pool.max-wait=1000
tencent.redis.pool.max-active=2000
tencent.redis.pool.max-idle=1000
tencent.redis.pool.min-idle=500

application.yml Format


# Default Redis configuration in Spring Boot
spring:
data:
redis:
host: XX.XX.XX.XX
port: 6379
password: XXXX
database: 0

# Custom Tencent Redis configuration
tencent:
redis:
# host: XX.XX.XX.XX
# port: 6379
# database: 0
# password: XXXX
connect.timeout: 2000
command.timeout: 2000
tcp:
keepalive:
time.idle: 30
time.interval: 10
count: 3
user.timeout: 30
pool:
max-wait: 1000
max-active: 2000
max-idle: 1000
min-idle: 500

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan