Any help on this really appreciate.
The request handler is in Lua. It basically breaks a request in to sub requests, adds a query parameter to each sub request and directs them through an consistent hash upstream module in C. The upstream configuration, reads the query parameter and sets it to the command variable. I don't see a way to remove the query parameter after this step.