支持5000个并发用户的Apps Script Web App [英] Support 5000 concurrent users of Apps Script Web App

查看:44
本文介绍了支持5000个并发用户的Apps Script Web App的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为G Suite客户设计一个小型应用程序.该应用程序将由该客户的所有员工使用,在高峰时段可能会看到多达5,000个并发用户.

I am in the process of architecting a small application for a G Suite customer. The app will be used by all employees at the customer and during peak times could see as many as 5,000 concurrent users.

他们没有App Maker,也没有计划很快启用App Maker.

They do not have App Maker and do not plan to enable App Maker anytime soon.

Apps Script Web App能够处理这么多并发用户吗?

Will an Apps Script Web App be able to handle this many concurrent users?

数据库:我最初考虑使用Google表格作为数据库.关于将数据读取或写入Google表格没有记录的Apps脚本限制.因此,只要我保持在Google Sheets API配额限制之内,我就会很好.

Database: I was originally thinking of using a Google Sheet as the database. There are no documented Apps Script limits around reading or writing data to a Google Sheet. So as long as I stay within the Google Sheets API quota limits I should be good.

话虽如此,我也正在辩论将Cloud SQL用作数据库.App Maker会强制您使用Cloud SQL,因此我认为它是Google表格的高级选择.我看到从Apps Script连接到Cloud SQL的唯一方法是通过JDBC服务.但是,每天有50,000个连接的硬限制. https://developers.google.com/apps-script/guides/services/quotas#current_quotas 有人知道此限制是针对每个应用脚本还是针对每个用户?如果是每个应用程序脚本,那么每天有5,000个用户只能进行10次通话.那将无法满足我的需求.

With that said, I am also debating on using Cloud SQL as the database. App Maker forces you to use Cloud SQL so I assume it is a superior option to a Google Sheet. The only way I see to connect to Cloud SQL from Apps Script is via the JDBC service. However there is a hard limit of 50,000 connections per day. https://developers.google.com/apps-script/guides/services/quotas#current_quotas Does anyone know if this limit is per app script or per user? If per app script, then 5,000 users would only have 10 calls each per day. That would be unusable for my needs.

侧面说明,Google Cloud SQL最多具有4,000个连接.我认为读取和写入将非常快,因此单个时间点的最大连接数将少于4,000.

Side note, Google Cloud SQL has a maximum of 4,000 connections. I am banking on the fact that reads and writes will be extremely fast so max connections at a single point in time will be less than 4,000.

推荐答案

作为 TheMaster ,您在上述注释中指出GAS Web App最多可以同时执行30个操作,这将您限制为最多30个并发用户.

As TheMaster noted in the above comment you have a max of 30 simultaneous executions which limits you to a max of 30 concurrent users for a GAS Web App.

作为替代方案,您也许可以利用云函数(基本上只是Node.js/Express.js模块).̶M̶a̶x̶̶n̶u̶m̶b̶e̶rr̶̶o̶f̶̶c̶o̶n̶c̶u̶r̶r̶e̶n̶t̶̶1̶0̶0̶0̶0̶̶t̶h̶o̶g̶h̶.它不是一个免费平台,但它支持CloudSQL,并且可能比按App Maker的要求获得Google for Business帐户(每位用户每月11.00美元)便宜.

As an alternative you might be able to leverage Cloud Functions (basically just a Node.js/Express.js module). ̶M̶a̶x̶ ̶n̶u̶m̶b̶e̶r̶ ̶o̶f̶ ̶c̶o̶n̶c̶u̶r̶r̶e̶n̶t̶ ̶u̶s̶e̶r̶s̶ ̶i̶s̶ ̶1̶0̶0̶0̶ ̶t̶h̶o̶u̶g̶h̶. It's not a free platform, but it supports CloudSQL and may be cheaper than getting a Google for Business account (US$11.00 per month per user) as required by App Maker.

这篇关于支持5000个并发用户的Apps Script Web App的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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