2

We have an application that we deploy on separate instances to each of our customers in a multi-instance architecture. We are developing a feature that will utilize the YouTube Data v3 API on the server, for which we need a server API key to access public information about YouTube videos. For example, we might make a call like this:

GET https://www.googleapis.com/youtube/v3/videos?part=snippet&id=jofNR_WkoCE&key={YOUR_API_KEY}

Using the Google Developer Console, I can manually generate one such key given that I have created a Project in the dashboard:

{YOUR_API_KEY}

My understanding is that the key is used to track usage and enforce quota out of our alotted 50,000,000 reqs/day. My question is, what is the appropriate registration practice for multi-instance applications?

  • Should I use separate Projects for each tenant?
  • Should I use a single Project, but separate Applications (generating new keys) for each tenant?
  • Should I use a single Project and a single Application, but specify the userIp or quotaUser parameters when making the API calls to distinguish instances?

My question is motivated by a desire to understand 1) how quota limits change, if at all, for multiple instance applications, and 2) how to partition instances correctly such that one tenant cannot affect another tenant's quota.

Cameron Flint
  • 450
  • 5
  • 15

0 Answers0