Creating a single proxy that connects with multiple different Target URLs?

Not applicable

Hi

I have question regarding API proxy

Is there a way to configure same proxy with different target URL ? or can we use the same proxy to target to 2 different version of target URL?

e.g. I have API with target Url like ..../v1/test and after an year if we have another version of same API with little change with url like.../v2/test and we want to keep both versions active, should we create a separate APi proxy for that ?

Is there a way to configure a proxy with multiple different target URLs ?

thanks

0 1 597
1 REPLY 1

Yes, you can do that.

Check out the RouteRule capability.

A single proxy might today route to /v1/backend .

In 6 months, maybe you launch a new version of the backend. /v2/backend.

At this point you could modify the existing proxy to *conditionally* route to the /v2/backend.

The condition could be based on:

  • client app
  • developer
  • time of day
  • weighted selection (2% to new version, 98% to existing)
  • some combination of the above. For example weights might be 2/98 for app1, or 40/60 for app2, and 0/100 for app3.