cloudflare / cloudflare/lua-resty-logger-socket

Multi-node acceptance of data

Open
#45 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Raku
Stars
493
Forks
128
PR merge metrics
No merged PRs in 30d

Description

Hi! if I need to send to multiple nodes, can you support it?
I found that when I have multiple nodes, I can't control each node to get accurate data.
Here is an example:

influx_config = {
{
host = "192.168.1.2",
port = 8911,
sock_type = "udp",
},
{
host = "192.168.1.3",
port = 8911,
sock_type = "udp",
percent="50%"
},
{
host = "192.168.1.4",
port = 8911,
sock_type = "udp",
},
}

if not logger.initted() then
local ok, err = logger.init(
influx_config[index] -- index is: 1 or 2 or 3, I will perform hash sharding
)
ngx.log(ngx.ERR,'12312312300000000000')
if not ok then
ngx.log(ngx.ERR, "failed to initialize the logger: ",err)
return
end
end

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.