Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis cache can not write properly, please ask if my configuration is correct #656

Open
lixianseng-limeidong opened this issue Mar 16, 2023 · 0 comments

Comments

@lixianseng-limeidong
Copy link

lixianseng-limeidong commented Mar 16, 2023

frontend:
listen_port: 8480

caches:
#使用Redis缓存的配置选项
rds1:
provider: redis
redis:
#客户端 模式: 标准,集群 哨兵 模式
#默认是标准
client_type: standard
protocol: tcp
#Endpoint定义了用于连接redis的Unix套接字文件的fqdn+端口或路径
#endpoint 定义了用于连接redis的地址,域名以及端口。
endpoint: 'redis-for-trickster-service.redis-for-trickster.svc.cluster.local:6379'
#endpoint: '192.168.3.74:30379'
#Protocol定义了连接redis的协议(unix或tcp)。TCP是默认的
protocol: tcp
#Password提供redis密码。默认为空字符串 ''
password: 'sucheonredis'
#db是连接服务器后选择的数据库。默认值为0
db: 0
#Max_retries是放弃该命令之前的最大重试次数
max_retries: 10
#Min_retry_backoff_ms是每次重试之间的最小回退时间
min_retry_backoff_ms: 500
#Max_retry_backoff_ms是每次重试之间的最大回退时间
max_retry_backoff_ms: 1000
#Dial_timeout_ms是建立新连接的超时时间
dial_timeout_ms: 10000
#Read_timeout_ms是套接字读取的超时时间。如果达到,命令将超时失败,而不是阻塞。
read_timeout_ms: 5000
#Write_timeout_ms是套接字写的超时时间。如果达到,命令将超时失败,而不是阻塞。
write_timeout_ms: 5000
#Pool_size是套接字连接的最大数目。
pool_size: 20
#Min_idle_conns是空闲连接的最小数目,在建立新连接较慢时很有用。
min_idle_conns: 20
#Max_conn_age_ms是客户端退出(关闭)连接的时间。
max_conn_age_ms: 5000
#Pool_timeout_ms是客户端在所有连接都繁忙时等待连接的时间,然后返回错误。
pool_timeout_ms: 4000
#Idle_timeout_ms是客户端关闭空闲连接的时间。
idle_timeout_ms: 300000
#Idle_check_frequency_ms是空闲连接reaper进行空闲检查的频率。
idle_check_frequency_ms: 60000
tracing:
std1:
provider: stdout
stdout:
pretty_print: true

backends:
prometheus1:
provider: prometheus
prometheus:
labels:
labelname: local-esxi
# prometheus 代理地址
#origin_url: http://192.168.3.57:31111
origin_url: http://prometheus.prometheus.svc.cluster.local:9090
is_default: true
#hosts: []
#cache_name: default
cache_name: rds1
forwarded_headers: standard
#Cache_key_prefix定义了后端添加到缓存键的前缀。当使用像Redis这样的共享缓存时,这可以帮助划分具有相同主机名或ip地址(默认前缀)的多个trickster实例。
cache_key_prefix: trickster-redis
#Negative_cache_name标识与此后端一起使用的负向缓存的名称(上面配置过)。Default是Default
negative_cache_name: default
#rule_name: example-rule
#req_rewriter_name: example-rewriter
#tracing_name: std1
compressable_types:
- text/javascript, text/css, text/plain, text/xml, text/json, application/json, application/javascript, application/xml ]
timeout_ms: 1800000
keep_alive_timeout_ms: 3000000
max_idle_conns: 20
max_ttl_ms: 86400000
revalidation_factor: 2.0
max_object_size_bytes: 524288
# These next 7 settings only apply to Time Series backends
backfill_tolerance_ms: 300000
#backfill_tolerance_points: 0
timeseries_retention_factor: 1024
timeseries_ttl_ms: 21600000
logging:
log_level: info
#log_file: /etc/trickster/trickster.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant