Using Tyk as a forward proxy

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:16:52 +0000.
Sender:Ming Fang.
Date:Sunday, 28 June 2015 04:51:14 UTC+1.

As a api consumer of external vendor apis, I would like to access those api via Tyk acting as a forward proxy.
By funneling all external api access thru a forward proxy, I can leverage Tyk’s analytics and api management capabilities sub as rate limiting.
Most importantly I would like Tyk to manage any secrets needed to connect to the external api such as api keys.
Tyk in the forward proxy role will also manage failover if my vendor provides multiple api endpoints.

Can Tyk act as a forward proxy in the way I describe?

As an example, here is how 3Scale’s APITools can use its middleware ability to authenticate api access with twitter

Imported Google Group message.
Sender:Martin Buhr.
Date:Sunday, 28 June 2015 08:45:33 UTC+1.

By funneling all external api access thru a forward proxy, I can leverage Tyk’s analytics and api management capabilities sub as rate limiting

  • yes this should work, so long as those APIs are defined in Tyk
    Most importantly I would like Tyk to manage any secrets needed to connect to the external api such as api keys.

  • Yes you can do this using either Tyk header injection or custom middleware JSVM

Tyk in the forward proxy role will also manage failover if my vendor provides multiple api endpoints.

  • not currently supported, in an API definition there is one upstream URL

Can Tyk act as a forward proxy in the way I describe?

  • partially

As an example, here is how 3Scale’s APITools can use its middleware ability to authenticate api access with twitter

  • You can do something very similar using our JS middleware stack, in this case you would want a post-processor (one where rate limiting etc has been already applied). There is an example included with Tyk and also docs on the API on the site.

Someone else has asked about multiple upstream URLs, so it may be something we add in in a future version.

1 Like

We are evaluating if we can use Tyk as a forward api proxy. I do understand that Tyk could be used as a forward proxy but I would like to get more details for the below requirements.
We are integrating external systems through REST api’s which are slow in performance. We would like to understand if Tyk can act as a forward api proxy to cache the api responses from the external systems.
1. Can Tyk cache the api responses from external systems?
2. How does Tyk forward proxy handle API rate limiting errors from external systems? We have around 6000 api resources being called by our application deployments. Can Tyk pause the ongoing the api calls once any one of them receives an HTTP 429 error?
3. How does Tyk forward proxy retry api calls on failures? Does it have a backoff policy?
4. Can Tyk be configured such that it prioritizes certain api calls over others?

Kindly let me know your thoughts.
Thanks!