Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow variables in tnt_pass #140

Open
ochaton opened this issue Dec 9, 2020 · 0 comments
Open

Allow variables in tnt_pass #140

ochaton opened this issue Dec 9, 2020 · 0 comments

Comments

@ochaton
Copy link
Member

ochaton commented Dec 9, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant