Skip to content

Allow variables in tnt_pass #140

@ochaton

Description

@ochaton

We have dynamic balancer which discovers inside ngx.timer (from lua-nginx-module) upstreams of tarantool and balances client requests according to some application logic. We would like to configure tarantool location in the following way:

server {
    server_name _;

    location .tnt {
        internal;
        tnt_pass $tarantool;
    }

    location / {
        set $tarantool "placeholder";
        content_by_lua_block {
            for _, tnt in app:upstreams() do
                ngx.var.tarantool = tnt -- sets variable
                app:execute() -- performs internal request to .tnt
            end
        }
    }
}

We can't do this now, because tnt_pass requires IP address or upstream name

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions