Add Support for js_balancer like balancer_by_lua_block
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.6k
- Forks
- 239
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 10
Description
Are there any plans to introduce a js_balancer function akin to balancer_by_lua_block found in the Lua Nginx Module (https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#balancer_by_lua_block)? We rely on balancer_by_lua for dynamically selecting servers. For instance, we utilize server tagging across multiple upstreams and use variables as a switch to avoid selecting servers with specific tags during proxying. This balancer hook is highly beneficial. However, it seems that NJS lacks a comparable hook.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source files, tests, or entry points. Start by reading the njs documentation and the linked Lua balancer_by_lua_block reference, then determine the scope and acceptance criteria for an equivalent JavaScript balancer hook.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nginx
- Domain
- backend, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100