Is it possible to scale Google Apps Script? - google-apps-script

If I write an entire web app in GAS and then it gets popular and it starts receiving a thousand requests per second. Is there any way to either pay Google to handle it, or host my GAS app on non-Google infrastructure, in the same way that here does for Google App Engine?

Your GAS script scales up automatically. The only thing that you should be worried about is your code where, if you have locks, thousands of users waiting for a lock will cause delays to the user. Other than that, scaling up shouldn't be a problem. After all, there are possibly millions of scripts being run by different users.

I've never seen Google suggest Apps Script is the tool for that kind of scale. Go to App Engine, do not pass Go, etc.
There is no third-party implementation of the Google Apps Script services. It is, however, a JavaScript implementation on Java (think Rhino) which you can run yourself - or you could run on App Engine and use the Java GData APIs to replace the Apps Script services.

if the App is running under the user account (execute the app as the user accessing the web app) it will consume each user's quotas and use their own account resources (docs, sheets, etc). This would allow for 'unlimited' scalability.
This is just my own view, am I right or totally wrong?

Related

Bandwidth Quota for Google Apps Script

This morning we got a couple of errors from Google Apps script saying:
Exception: Bandwidth quota exceeded...
Try reducing the rate of data transfer.
Our Google Apps Script (GAS) programs mainly look at Gmail, do some processing, access Google Maps some, and transfer data back and forth between GAS/GCP and an app hosted on another platform.
However, accessing Gmail doesn't seem to be what this is talking about. "Bandwidth quota" would seem to indicate too much data is being transferred into and out of the Google servers via Google Apps Script. We do transfer a fair amount of data back and forth to an app hosted on another platform on the Internet, such as Amazon Web Services.
However, we don't see that there is a "Bandwidth quota" on the Google Services Quotas page. AND around the time we got this error this morning, we weren't accessing Gmail nor transferring data back and forth outside of GCP any more than usual. Probably less.
Does anyone know what this quota is, where we can find it, and how we can possibly bump it up, even if we need to pay for it?
I looked at our Google Cloud Platform (CCP) Console Quotas (https://console.cloud.google.com/iam-admin/quotas) and we are well below any usage limit, and see none that are about a "Bandwidth Quota".
Thank you!
UPDATE 29 March 2022 - After more than a month of having zero of these messages, this evening we are seeing at least 10 of them. Some facts:
The "bandwidth quota exceeded" errors are only happening when calling the APIs for one particular external app hosted on AWS-like servers. They do not occur when calling drive, maps, etc. or any other APIs.
Today has been a lower-volume day & evening for our app than many are. So, this makes no sense why we would get these errors this evening and not other days.

Load testing an application that uses Google Maps

Our client has implemented Google Maps in their applications and we are working with them on a large scale load test. Our concern is that Google may interpret this test as a denial-of-service attack and shut out the application. With this in mind, I have three questions:
Is this an issue? Meaning, is Google likely to lock out our application during a test that might have 50,000 simultaneous users?
If this an issue, is there anyone we can chat with to get "pre-approval" of the apps during the testing period to make sure this doesn't happen.
Alternatively, does Google offer a version of their API for testing purposes? (I could not find any information in the documentation)
Please note that we are also exploring other solutions (excluding the calls from the app, stubbing out the API, etc).
Thanks in advance for any help!
Running the load test on the page that implements google maps may result in a bill or having maps turned off if you reach the daily limit of requests.
https://developers.google.com/maps/pricing-and-plans/

What are Google's Apps Script resource constraints?

I couldn't find this in the documentation. Ostensibly Google would terminate your script if it was consuming too many resources. Are there any guidelines on how to play nicely with Google's servers?
Have a look at the Apps Script Dashboard - especially under "Quota Limits." There are also rate limits that may limit the frequency of service calls in your projects.

How the quotas of google drive sdk works?

I am starting to develop a windows-like client google drive client for linux.
I have some problems that I am solving yet, but one no technical question are worrying me.
The drive sdk has request limit, I want open my app like other options (for example gdrive ) but the request limit will avoid general availability.
I need put a personal id, but I suppose that is not the way to publish the app.
How other options solve this problem?
Google Drive Apps have a "courtesy limit" of 10 million requests per day I believe.
I cannot imagine a situation in the near future where you will run into issues.
If so this is often referred to in the world of software development as "the good problem".
Google will no doubt allow you to scale if your app provides value to users and needs the bandwidth.

Google Drive SDK

I am developing an app in C++ which will run in a Windows desktop environment This will be distributed to a number of customers and I need to store log files from the customers in a central location where I can access them. Is Google drive a suitable platform for this and if so what is the best approach? Should I be looking at an Application Owned Account for example? Also I am concerned by the paragraph in the Google documentation:
"Note that there are limits on the number of refresh tokens that will be issued; one limit per client/user combination, and another per user across all clients. You should save refresh tokens in long-term storage and continue to use them as long as they remain valid. If your application requests too many refresh tokens, it may run into these limits, in which case older refresh tokens will stop working"
How long does a token remain valid for and what are the limits on refresh tokens?
Best regards
Trevor
You could use google drive for this, its not a bad idea really. But since its only log files you are storing and they are all owned by the application your not going to be needing to bother with user Oauth2. You could do it with a google drive service account. This way the application owns the account and they are just uploading data to it.
https://developers.google.com/drive/service-accounts