是否可以将 Google Sheets API 配额限制提高到每个帐户 2500 个以上和每个用户 500 个以上? [英] Is it possible to increase the Google Sheets API quota limit beyond 2500 per account and 500 per user?

查看:60
本文介绍了是否可以将 Google Sheets API 配额限制提高到每个帐户 2500 个以上和每个用户 500 个以上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题: 遇到 Google Sheets API 读/写配额限制.具体来说,每 100 秒的读/写请求每个用户每 100 秒的读/写请求配额.

一些背景:
在过去的几个月里,我一直在为我们学区的学生和教职员工开发一个网络应用程序,它使用谷歌电子表格作为数据库.我们学区的每所学校都被分配了一个不同的 Google 电子表格,并创建了一个服务帐户来代表网络应用程序对这些电子表格进行读写调用.

我们从一所大约有 1000 名学生的学校开始,但现在已经扩展到另外两所学校,总用户负载约为 4000.由于上课日安排的性质,我们开始达到配额限制(每 100秒和每位用户每 100 秒),因为几乎每个人都同时使用该应用.

我找到了 Google 表格 API 的使用限制指南,并按照我创建了一个结算帐户,并将关联的服务帐户项目链接到它的说明.然后我转到开发人员控制台中的配额部分并申请了更高的配额.这涉及填写 Google 表单,询问您需要多少配额?用每天的 API 查询数量表示."同样,每天的查询次数不是问题,而是每 100 秒和每个用户(服务帐户)的查询数.几周后,我们的限制增加到每 100 秒 2500 个读/写请求和每个用户每 100 秒 500 个读/写请求.计费账户没有收费,经过一番搜索,我意识到这是一个免费的增加.我们配额限制的增加有所帮助,但它仍然是一个问题,因为我们区希望在未来增加更多学校.

以下是我需要知道的:

1) [ESSENTIAL QUESTION] 对于单个服务帐户/用户/IP 在 100 秒时间范围内可以发出的读/写请求数量,Google 是否有上限或最大值,如果有,是什么?

2) 如果有可能超出我们当前的配额限制 (2500/500),是否还有其他方式请求/申请增加.我们再次为该项目建立了一个计费帐户,并愿意为该服务付费.

我一直在努力为我的问题找到明确的答案.这篇文章接近我想要的,我什至做了 OP 建议的一些事情,但我只需要直接回答我的基本"问题.

还有更多事情要做.我知道 Google Charts Visualization 没有配额限制,但我会考虑使用它,但是出于隐私原因,我无法在纯 JavaScript 中公开电子表格键.这里还有其他选择吗?此外,有人可能会建议创建多个服务帐户,但如果可能,我宁愿避免这种情况.

感谢您的帮助.我是新手,非常感谢您的时间和专业知识.

解决方案

回答您的问题:

1) [ESSENTIAL QUESTION] 对于单个服务帐户/用户/IP 在 100 秒时间范围内可以发出的读/写请求数量,Google 是否有上限或最大值,如果有,是什么?

  • *提供的文档仅说明Google表格API 的每个项目每 100 秒限制为 500 个请求,每个用户每 100 秒限制为 100 个请求.查看此帖子 了解更多信息.*

2) 如果有可能超出我们当前的配额限制 (2500/500),是否还有其他方式请求/申请增加.我们再次为该项目建立了一个计费帐户,并愿意为该服务付费.

  • AFAIK,您可以请求更高的配额限制,只要您提出合理的请求,Google 工程师可能会批准该请求.

此外,您可以查看此线程以获取其他提示:

<块引用>

  1. 您可以使用 spreadsheets.get 在一次调用中读取整个电子表格,而不是每个请求一次调用.或者,你可以使用 spreadsheets.values.batchGet阅读多个不同的如果您需要的只是值,则可以在一次调用中取值.

  2. Drive API 提供推送通知",因此您可以在发生更改时收到通知并对这些更改做出反应,而不是轮询他们.通知的延迟有点慢,但它完成了工作.

The problem: Running into Google Sheets API read/write quota limits. Specifically, the read/write requests per 100 seconds and read/write requests per 100 seconds per user quotas.

Some background:
For the past few months I've been developing a web app for students and staff in our school district which uses a Google spreadsheet as the database. Each school in our district was assigned a different Google spreadsheet, and a service account was created to make read and write calls to these spreadsheets on behalf of the web app.

We started with one school of approximately 1000 students, but it has now expanded to two other schools with a total user load of around 4000. Due to the nature of a school day schedule, we started hitting our quota limit (per 100 sec & per 100 sec per user) since almost everyone uses the app at the same time.

I found the usage limits guide for the Google sheets API, and as per the instructions I created a billing account, and linked the associated service account project to it. I then went to the quotas section in the developers console and applied for a higher quota. This involved filling out a Google form which asked "How much quota do you need? Express in number of API queries per day." Again, queries per day is not the problem, rather it's the number of queries per 100 seconds and per user (service account). After a couple of weeks our limit was increased to 2500 read/write requests per 100 seconds and 500 read/write requests per 100 seconds per user. The billing account was not charged, and after a little searching, I realized this was a free increase. This bump in our quota limit helped, but it's still going to be an issue because our district wants to add more schools in the future.

Here's what I need to know:

1) [ESSENTIAL QUESTION] Does Google have an upper limit or maximum to the number of read/write requests a single service account/user/IP can make within the 100 second time frame, and if so what is it?

2) If it is possible to go beyond our current quota limit (2500/500), is there another way of requesting/applying for the increase. Once again we have a billing account established for the project and are willing to pay for the service.

I've been pulling (what's left of) my hair out trying to find definitive answers to my questions. This post came close to what I was looking for, and I even did some of the things the OP suggested, but I just need a direct answer to my "essential" question.

Couple more things. I understand that Google Charts Visualization doesn't have a quota limitation, and I'd consider using it however, for privacy reasons I can't have the spreadsheet keys exposed in plain javascript. Are there other options here? Also, one might suggest creating multiple service accounts, but I'd rather avoid this if possible.

Thank you for your help. I'm very much a novice and I greatly appreciate your time and expertise.

解决方案

To answer your questions:

1) [ESSENTIAL QUESTION] Does Google have an upper limit or maximum to the number of read/write requests a single service account/user/IP can make within the 100 second time frame, and if so what is it?

  • *The provided documentation only stated that Google Sheets API has a limit of 500 requests per 100 seconds per project, and 100 requests per 100 seconds per user. Check this post for additional information.*

2) If it is possible to go beyond our current quota limit (2500/500), is there another way of requesting/applying for the increase. Once again we have a billing account established for the project and are willing to pay for the service.

  • AFAIK, you can request for a higher quota limit and the Google Engineers may grant the request as long as you are making a reasonable request.

Also, you may check this thread for additional tips:

  1. You can use spreadsheets.get to read the entire spreadsheet in a single call, rather than 1 call per request. Alternately, you can use spreadsheets.values.batchGet to read multiple different ranges in a single call, if all you need are the values.

  2. The Drive API offers "push notifications", so you can get notified when changes occur and react to those, instead of polling for them. The latency of the notifications is a little on the slow side, but it gets the job done.

这篇关于是否可以将 Google Sheets API 配额限制提高到每个帐户 2500 个以上和每个用户 500 个以上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆