简体   繁体   English

Google Maps API限制适用于关键项目还是云项目?

[英]Are Google Maps API limits applied to key or to cloud project?

Google Maps API (Directions API) has limit of 50 queries per second (QPS): https://developers.google.com/maps/faq#usage_apis Google Maps API(Directions API)每秒只能查询50个查询(QPS): https : //developers.google.com/maps/faq#usage_apis

However, I need more than just 50 as my web app serves lots of users and 50 QPS is totally not enough , I get failure responses from Google Directions API all the times. 但是,我需要的不仅仅是50个,因为我的网络应用程序可以为许多用户提供服务,而50个QPS根本不够用 ,我一直都从Google Directions API获得失败响应。

I can create multiple keys to use but the matter is the limit of 50 QPS applies to a single key or applies to the whole Google Cloud project ? 我可以创建多个密钥来使用,但问题是50 QPS的限制适用于单个密钥还是适用于整个Google Cloud项目 It doesn't specify in the link above. 在上面的链接中未指定。

If it applies to the whole project, there's no point to create multiple keys. 如果适用于整个项目,则没有必要创建多个密钥。 Any one ever tried to identify this out? 有人试图找出这一点吗?

Quotas are scoped to Projects; 配额范围仅限于项目; multiple API Keys in a project do not impact the project's quotas. 一个项目中的多个API密钥不会影响该项目的配额。

API Keys are often (not always) a way to provide otherwise unauthenticated users with a form of bearer token to access a Google API|service and APIs and services are always associated with a project. API密钥通常是(并非总是)一种为未经身份验证的用户提供承载令牌的形式来访问Google API |服务的方式,并且API和服务始终与项目相关联。

If you lose (control of) an API Key, anyone using it (until it is deleted) is able to use the Key to access its project's resources. 如果丢失(控制)API密钥,则使用它的任何人(直到删除它)都可以使用该密钥来访问其项目的资源。

For this reason, you may wish to use different API Keys for different subsets of your user base. 因此,您可能希望对用户群的不同子集使用不同的API密钥。

And|Or you may wish to employ a system in which you "rotate" API Keys (create new and eventually replace existing) to effectively require your users to reconfirm their use of your app. 并且|或者您可能希望采用一种系统,在该系统中“旋转” API密钥(创建新密钥并最终替换现有密钥)有效地要求您的用户重新确认他们对您的应用程序的使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM