I’m using kong to split traffic between a new API endpoint and an old one. This is pretty easy to set up by configuring the service/path and attaching the two separate upstreams with respective weights.
However, up to this point, it appears that Kong assumes that the API paths will be the same. Is there a way to rewrite the path on one upstream or the other depending on which upstream the load balancer decides to forward it to?
Kong is at path
Upstream A (old) is at path
/some/folder/submit.php (weight 80)
Upstream B (new) is at path
/api/v2/submit (weight 20)
(POST payloads to each are the same)
Is this possible? I know it’s a bit odd, but otherwise it means that I’d have to deploy Kong and then do a series of URL rewrites on the backend web server.
Thanks in advance!