Max API's Count

BetterCloud interfaces with many external SaaS applications on behalf of our customers. We would like to use Kong as a rate limiting infrastructure piece between our microservices and the external SaaS apps. We thought about creating an API for each SaaS application, e.g. google-rl-api, slack-rl-api, dropbox-rl-api.

However, some of the SaaS apps use a custom sub domain per customer, e.g. Since Kong does not support dynamic upstream urls, we would need to configure an API for each custom sub domain.

Is there a better approach, or is it ok to create 200 API’s? 500 API’s? 1000? 5000? We expect this problem to continue to grow. Is Kong the correct solution? Or should we investigate another tool?

Kong can handle those numbers. But depending on the exact data/structure a custom plugin might be more efficient.

Good to know. We are probably going to end up using a custom plugin. There are still more details to iron out on our side, but the solution will probably end up in a blog post at some point.

Thanks again for the feedback

How about using wildcard hosts?

Thanks for the suggestion. I was under the impression that we needed to set a static upstream url. I tried the following using “preserve host”:

Upstream Url:
Preserve Host: true

curl http://localhost:8000/ -H "Host:"
curl http://localhost:8000/ -H "Host:"

It appears that it is attempting to resolve the correct host but the DNS cannot resolve through curl or postman.

Am I doing something wrong with wildcards or preserve host?