0

I need to create an upstream block in the default.conf dynamically with Openresty and Lua.

upstream my_gateway{

    for server in #SERVERS_ENV:
       server xxx.xxx.xxx.xx:yyyy  max_fails=3 fail_timeout=30s;
}
Phoenix
  • 3,996
  • 4
  • 29
  • 40

1 Answers1

1

ngx.balancer is what you are looking for.

un.def
  • 1,200
  • 6
  • 10