---
feature_story: FS_65_22_23_82
feature_title: redirect per command
feature_status: TODO
---

# Idea

There should be a way to configure one server so that it redirects requests to another server.

This is convenient in cases when:
*   some local small server is used for private commands
*   while some big server is used for public commands

# Implementation

TODO: Decide: this redirect can be done by either|or:
*   HTTP 307 response to client by `server_a` (and client request the same thing again by itself from `server_b`)
*   `server_a` on behalf of the same client request contacts to the `server_b`

# Comparison: coexistence vs redirect

At user level, the feature is similar to FS_57_36_37_48 multiple clients coexistence - table for comparison:

| FS_57_36_37_48 coexistence                                                    | FS_65_22_23_82 redirect                                                      |
|-------------------------------------------------------------------------------|------------------------------------------------------------------------------|
| There are multiple `@/` directories (`argrelay` client installations).        | Only one `@/` directory is enough.                                           |
| There are more than one `@/exe/argrelay_rc.bash` to source.                   | Only one `@/exe/argrelay_rc.bash` is enough to source.                       |
| Bash uses different client configs for different commands.                    | `argrelay` redirects to different server for different commands.             |
| There are potentially as many servers as there are coexisting client configs. | There is only one server to send the first request.                          |
| All client configs may actually connect to the same server.                   | Redirect implies that the other server is a different one (to avoid cycles). |

