Load balancing with json api

how can we rewrite the following load balancing config with json api?

proxy / http://localhost:15984 http://localhost:25984 http://localhost:35984 {
policy round_robin
health_check /_up
health_check_duration 5s
try_interval 500ms
keepalive 0
transparent
}

As a first step, you can rewrite that config with Caddy v2’s Caddyfile. See the reverse_proxy docs here:

Then, you can use the caddy adapt command to see what JSON it outputs. You can then use that to see which JSON path you need to modify with the API.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.