google app engine - Backend Instances being billed - google-app-engine

We have deployed an application on GAE which seems to have a unusual amount of usage of Backend instances like in 7000 range every day. Even though it's still in development stage and there is not much usage other than a few hours every day by a set of 2-3 users.
What we need help with is in understanding why and how this Backend instances are being consumed? Is there a good way to check it? Is there a configuration or something that we can play with to control it fully?

Related

Is a latency between 1 and 2 seconds normal for Google Cloud Endpoints and App Engine?

I'm new to Google Cloud. I followed this tutorial to create a simple API with Google Cloud Endpoints and App Engine, using Cloud Endpoints Frameworks for Java 8:
https://cloud.google.com/endpoints/docs/frameworks/java/get-started-frameworks-java
The tutorial was easy enough to follow, but I'm not happy with the performance of my API. The latency for a simple request is consistently between 1 and 2 seconds, which seems unacceptable for production use. I'm not taking into consideration the first request, as that takes over 10 seconds when my App Engine instance is not loaded.
The URL I'm testing is "_ah/api/echo/v1/echo", which code wise is super simple.
Am I missing something? Is this expected behavior latency wise?
Edit: That behaviour was with a Sao Paulo instance. I now changed to a us-central and a us-east1 instance, and Endpoints is still under performing. I've been doing some other tests though.
When I deploy my API directly to App Engine, without using Endpoints, I get consistent 300ms times from Argentina. When I deploy it with Endpoints, I get times that fluctuate between 500ms to 1.5 seconds. It's not stable at all, and it's bad all around. However, when I test the same thing from within the US, I get times around 50ms for either case. Endpoints don't seem to be a problem there.
Any ideas why I could be having these issues with Endpoints from Argentina?

Visualize distribution of requests by load balancer across multiple instances on Google App Engine

I have my code running on App Engine Flex with 5 instances.
Is there a way we could graphically visualize the distribution of requests per instance wise.
The current dashboard doesn't display to the instance level and my client is interested to get an instance level view.
At this time it is not possible to do something like that. However, I created a feature request for this. I suggest you to star the Feature Request and every time there is an update you will be notified.

Google appengine shows zero instance hour usage, even though two instances are up

I recently deployed a Node.js app in google appengine.
When I go to appengine dashboard and check resource usage, no frontend instance hour usae is shown.
But, in Instances tab, it shows that two instances are up.
Since the instances are up, and I have made several http requests to the application, I didn't expect to see zero instance hour usage. Also, according to this answer, 15 instance minutes charged for every instance spin up.
So what could be the reason for showing zero instance hour usage in my app?
(I checked the usage several times within last 24 hours, so this cannot be due to the update delay in dashboard)

_ah/warmup keeps getting called

I have a Google App Engine server up and running. I don't have any cron jobs or anything that I am aware that calls the default website url. I have had over 70,000 requests for the _ah/warmup in the last 24 hours. How can I figure where this traffic is coming from? Is this a denial of service attack on the server?
The warmup request is, as explained by the Google Documentation, an internal call that is made whenever you spin up new instances.
Without any more information, the only thing 70 000 requests to that URL means is that your scaling is maybe a bit too aggressive and your app is spinning too many instances.

Google App Engine quota reached on test site. What am I doing wrong?

First off, I'm totally new to GAE. 3 days ago I did a search on Google for hosting a website on Google App Engine for free. I found this tutorial on labnol.org:
http://www.labnol.org/internet/host-website-on-google-app-engine/18801/
I was under the impression that GAE's quota for free users was high. My site has received very little traffic. At best, the site is getting 50 daily page views, of which most, if not all, are mine. I'm testing my code on and refreshing my browser.
GAE indicates the following: Frontend Instance Hours - 100% - 28.00 of 28.00 Instance Hours
I made no adjustments to my GAE settings UNTIL this morning. 2 things changed in the last 12 hours:
I changed my frontend instance class from the default f1 to f4. My reason for doing so was to see if it would improve my site's loading time (it didn't). My site is a fairly small and simple site.
I replaced the html files and images from the last 2 days with fresh ones this morning. Doing this resulted in my making some changes to files and uploading (deploying via GoogleAppEngineLauncher Mac app) changes probably about 5 times per hour.
On my settings page everything is at 0, with the exception of this one:
Frontend Instance Hours 100% 28.00 of 28.00 Instance Hours
How did I reach the hosting quota for GAE? Should I adjust any other settings? What can I do to prevent this from happening in the future?
Additional facts:
The size of the folder containing all my files is 38kb in size.
I have Google Analytics, by way of Javascript, running on index.html (none of the other pages).
I'm using raw, basic, html.
my pages consist of approximately 3kb of image data being served per page.
Thanks
If your website consists of largely static content, I highly recommend you implement Frontend Caching. This should drastically cut down your instance hours as the majority of it would be served off Google's frontend servers.
For every page that's served from cache, you'll see a 204 logged in AppEngine. See also this talk on scaling GAE apps.
Note that there's also the option of using memcache within your app, but briefly looking at that tutorial link, I suspect this won't apply to you.
I changed my frontend instance class from the default f1 to f4.
F4 class instances consume hours 4 times faster. Your 28 hour quota will get exhausted every 7 hours.
If you're using that much instance time serving 50 static pages, I'd guess that your idle instance setting is set at 1 or more (which would make the app run all day even when no one is using it). Make sure that on your application settings page the "idle instances" slider is set at "automatic-1".
He will not be able to adjust his Idle Instance setting until enabling billing.

Resources