Community Blog FAQ: Alibaba Cloud API Gateway - Friday Blog, Week 61

FAQ: Alibaba Cloud API Gateway - Friday Blog, Week 61

In today's post, we look at some API Gateway questions that come up frequently during Alibaba Cloud training sessions.

By: Jeremy Pedersen

I want to talk about a service today that hasn't gotten enough love: API Gateway.

The API Gateway service is a critical piece of middleware: it's a cheap, easy way to add a layer of abstraction between what your applications (and customers) see, and what's actually happening on the backend.

Essentially, API Gateway lets you expose services as RESTful APIs, managed by the API Gateway service itself. This means a lot of the heavy lifting associated with setting up an API is done for you.

What Does API Gateway Do?

API Gateway gives you a way to handle an API's full lifecycle, including things like:

  • Publishing APIs
  • Updating and versioning APIs
  • API call throttling and API monetization
  • Security (preventing replay attacks, and allowing you to enable request signing/authentication)

The very best thing about API though is something else entirely: it adds a layer between your backend - whatever it might be - and the users of your API.

This is excellent, because it means you can change how your backend is implemented without affecting the applications that call your API.

Alibaba Cloud already has extensive documentation for the API Gateway service, which you can find here, so I'm not going to get into the nitty-gritty in today's post.

Instead, I want to answer questions about API Gateway that frequently come up during Alibaba Cloud training sessions. Here we go!

API Gateway FAQ

Q: Does API Gateway offer any kind of developer portal, or offline development tools like an IDE?

Unfortunately no. However, you can:

  1. Use Alibaba Cloud's API Explorer tool to learn how to set up, create, and manipulate API Gateways using Alibaba Cloud's public API. Confusing now? I'm talking here about using the Alibaba Cloud API to set up your API Gateway APIs!
  2. You can test out and troubleshoot your API using the built-in troubleshooting tool that's part of the API Gateway web console.

Q: Can API throttle API requests by total bandwidth, rather than number of requests?

Not at the moment. You can only limit calls to API Gateway based on number of requests, not total bandwidth used.

Q: Can API Gateway periodically make requests to the backend on its own, (say, to "pre-heat" a serverless function)?

Unfortunately no. However, if the backend behind API Gateway is Alibaba Cloud Function Compute (Alibaba Cloud's serverless computing tool), you can make sure your functions are "hot" by using provisioned mode, which gets around the need to have API Gateway periodically trigger functions on its own.

Q: Can API Gateway cache responses from backend services, so that it doesn't have to query the backend every time a new request comes in?

Yes, see this documentation.

Q: Does API Gateway support OAuth or generic SAML authentication for incoming API requests?

Currently API Gateway supports OAuth and JWT.

Q: Can there be more than one backend service behind a single API endpoint?

Yes, there are many ways to do this:

  1. Define an "API Group", and create multiple APIs inside this group (each with its own path, like /users or /products). These APIs can then point to different backend services.
  2. Define a single API and use plugins to dynamically map requests onto more than one backend service.
  3. Create an API that points to Function Compute, and use Function Compute to call other services for you (this lets you implement arbitrarily complex API call logic).

Where Can I Learn More?

I'm a big fan of learning hands-on whenever possible. I recommend checking out the Quick Start guide in the API Gateway docs.

Hopefully I'll have time to do a couple more blogs on this in the future. See you next week!

0 1 0
Share on


71 posts | 154 followers

You may also like



71 posts | 154 followers

Related Products