【问题标题】:Benchmark concurrent reads for a single Google Spreadsheet via multiple App scripts通过多个应用脚本对单个 Google 电子表格的并发读取进行基准测试
【发布时间】:2020-08-19 06:28:06
【问题描述】:

我有一个 Google 电子表格,我想从多个 Google Apps 脚本(100 多个脚本和 10,000 多个用户)中读取该电子表格。

我不是在谈论 Google Apps 脚本基准测试。

通过多个 Google 应用脚本对单个电子表格是否存在并发读取限制?

【问题讨论】:

    标签: performance google-apps-script google-sheets google-sheets-api


    【解决方案1】:
    • Apps Script quota 没有提到这样的限制
    • 此外,每个项目/用户的 Apps 脚本配额计数 - 不是每个文档

    不过有limit coming from Google Drive:

    最多 100 人可以同时编辑和评论。

    超过 100 人可以查看文件,但发布文件和创建链接更容易。

    因此,如果脚本不仅读取,而且还编辑电子表格 - 可能无法同时被超过 100 个用户访问。

    另外,如果多个用户运行相同的脚本:

    • Apps 脚本对同时执行脚本有限制

    【讨论】:

    • 其实和 Google Spreadsheets API 限制有关。在文档中,他们在 100 秒内提供了 500 个最大并发用户。但我需要验证的是,它是否也适用于 Google Apps Script 中的 Sheet API? 1-developers.google.com/sheets/api/limits
    • Sheets API quota 就像 Apps 脚本配额一样适用于项目和用户。 500 requests per 100 seconds per project 表示每个 GCP project 有 500 个请求 - 因此,在同一个文件或 500 个不同文件上执行 500 个请求都没有关系。如果您在 Apps Script 中使用 SpreadsheetApp,它会在后台涉及 Sheets API,因此应用相同的配额(除了 Apps Script 配额之外)并且对 SpreadsheetApp 的每次调用都很重要。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-06
    • 1970-01-01
    相关资源
    最近更新 更多