Renzheng Wang
Renzheng Wang
I think a data storage like [lua-resty-counter](https://github.com/Kong/lua-resty-counter) needs to be implemented. The exemplar labels and timestamp will be stored in it. The key have a suffix `:exemplar`, for example `http_count{host="me.com",status="200"}:exemplar`,...
you just need to set a resolver (https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver).
You can try this. @liangwangkai -- redis_conn.lua local redis_cluster = require("rediscluster") local redis_config = require("redis_config") local redis_conn = redis_cluster:new(redis_config) return redis_conn -- other file local red_c = require("redis_conn")
> > You can try this. @liangwangkai > > -- redis_conn.lua > > local redis_cluster = require("rediscluster") > > local redis_config = require("redis_config") > > local redis_conn = redis_cluster:new(redis_config) >...
You can try lua_code_cache off; -> lua_code_cache on;
Because if lua_code_cache is off, the slot_cache will always miss (rediscluster.lua: 154) and fetch slots from redis for each request, the lock may be timeout in high concurrency (rediscluster.lua: 163).
I will try to running the test to see if I can reproduce the error.
@brancz Could you help to merge this PR? Thanks.
@roidelapluie PTAL