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

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

问题描述

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

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

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

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

这是我需要知道的:

1)[基本问题] Google是否对单个服务帐户/用户/IP可以在100秒的时间内发出读/写请求的数量设置上限或上限?它吗?

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

我一直在拉头发(还剩下什么),试图找到对我的问题的明确答案.这篇文章与我在寻找的内容很接近,甚至执行了OP建议的一些操作,但是我只需要直接回答我的基本"问题即可.

结合更多内容.我了解Google Charts Visualization没有配额限制,但是出于隐私方面的考虑,我不能考虑使用电子表格密钥,而我不能使用纯JavaScript公开电子表格密钥.这里还有其他选择吗?另外,可能会建议创建多个服务帐户,但我宁愿避免这种情况.

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

解决方案

要回答您的问题:

1)[基本问题] Google对单个服务帐户/用户/IP在100秒的时间内可以发出的读/写请求数量是否有上限或最大值?/p>

  • *提供的文档仅表示 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天全站免登陆