Block Requests based on UserAgents with Google Cloud App Engine - google-app-engine

my website is hosted with google cloud app engine. I have an increase request amount from the same user agent. Is there a possibility to block specific incoming requests with app engine, e.g. through the app.yaml file? I don't find anything related to that in the documentation.
Thanks in advance

Related

How can I use Google Cloud CDN for static website hosted on Google App Engine?

I am serving a super simple static website on Google App Engine. I chose the Zurich location which serves content pretty decently within all locations that I tested within Europe. Speed tests that I did online show <1s page load speeds within Europe. In the US, especially west coast, South America, Asia and Australia the page load time is, however, over 3s which is for me not acceptable.
Therefore I thought of using Google Cloud CDN. Unfortunately their CDN seems to require some HTTPS load balancers and I have no idea how to set that up. Seems silly if Google had their own CDN but that doesn't work with their App Engine so I'd have to go to Cloudflare.
Unfortunately, you're not able to use Google Cloud CDN for you site on Google App Engine. Nowadays Cloud CDN could be used to serve content that originates from Cloud Storage buckets, Compute Engine instance groups, and Compute Engine network endpoint groups.
Have a look at the documentation Overview of Cloud CDN:
The Cloud CDN content delivery network works with HTTP(S) load
balancing to deliver content to your users. The HTTP(S) load balancer
provides the frontend IP addresses and ports that receive requests and
the backends that respond to the requests.
Cloud CDN content can be sourced from various types of backends:
Instance groups
Zonal network endpoint groups (NEGs)
Internet network endpoint groups (NEGs) (Beta), for endpoints that are outside of Google Cloud (also known as custom origins)
Buckets in Google Cloud Storage
I found at Google Public Issue Tracker two feature requests about adding Cloud CDN support for App Engine Standard and Flexible - you can join these cases, comment and track progress.
Possible workaround for a simple site you can find in this article.

What does Google mean with "Google APIs"? Is an App Engine endpoint (e.g. xxx.appspot.com) a Google API?

I have a couple of running Cloud functions that fetch data from an external API and then post the received data into an internal API which is running on Google App Engine. I've come up with this approach because the external API has a rate limit that I sometimes need to bypass.
In order to calculate the monthly cost of this setup I was looking at the Google Docs and saw this:
Outbound data to other Google APIs in the same region is free, as is inbound data. Where the Google API you are using is global (i.e. not region-specific), it is considered to be the same region.
My question: What does Google mean with "Google APIs"? Is an App Engine endpoint (e.g. xxx.appspot.com) a Google API?
Google APIs generally refer to the APIs and services provided as part of Google Cloud, as well as other Google services such as SMTP provided by Gmail and recaptcha.

Is it possible to use Google Cloud CDN with App Engine Standard environment?

I see no way to connect my app engine backends with Cloud CDN. Seems like it's only available when using Compute Engine directly.
No, that is not currently possible. Currently, Google Cloud CDN can be used only to serve content that originates from Cloud Storage buckets, Compute Engine instance groups, and Compute Engine network endpoint groups. I agree that it would make sense to support App Engine Standard, too!
Update
Currently in beta is Serverless NEGs (Network Endpoint Groups) which will allow you to use App Engine behind a HTTP(S) Load balancer and give you all the features provided with that including CDN
Original
Yes, App Engine will serve content via Google Cloud CDN as long as a cacheable response is returned.
Try setting the Cache-Control header to something like max-age=86400, public and ensuring a Set-Cookie header is not sent with the response

GeoDNS routing on Google Cloud Load Balancer with Google App Engine as backend

We are looking to use Google App Engine for one of our low latency service. We are required to provide low latency service across the globe. Since Google App Engine is a regional service and there is no straight forward way to deploy it multi-regional. So, looking at Google Load Balancer to route at DNS level, but that also does not seems to be possible as load balancer not supporting App Engine as a backend service. Is there any other way to achieve GeoDNS routing in GCP for App Engine service.
There is not an direct way to achieve GeoDNS routing since App Engine is a regional service, as you said.
Read this feature request to have further insight on this. In the second comment they state the two possible workarounds, useful for both standard and flexible environments:
The workaround is how you mentioned, using a single project with a load balancer to route requests to Compute Engine instances in
different regions. Then have each Compute Engine instance act as
proxies to an App Engine project in each of the different regions
(where you would copy your code to each App Engine project).
It may be easier in the meantime to use Google Kubernetes Engine instead of App Engine for multi-regional application serving.
You could star the FR to support it.

I want to choose my own Server and own database in google app engine

I am very newly in google app engine.. There are three Questoins on google app engine and in google app engine i want to choose JAVA language.
Does google app engine provide private cloude ?
I want to deploy my application with my own server( E.x.glassfish or JBoss) on google app engine ?
I want to use my own database instead of cloud SQL in google app engine?
Is it possible or not?
With Google Cloud Appengine - no, it's impossible.
With Google Cloud Instances or Google Cloud Containers - all of this is possible.
Appengine is just one piece of Google Cloud, designed for very specific job, with infrastructure managed by Google. You can only write some code (with lot of restrictions too) that runs inside it. You can read some details about code restritions there: https://cloud.google.com/appengine/docs/java/#Java_The_sandbox
What you're looking for is Google Cloud Instances, that are more standard virtual machines, where you can run anything you want. See https://cloud.google.com/compute/
There is still tools for Load Balancing, Health Check, Centralized Logging for Cloud Instances, and other stuff similar to features provided by Appengine.

Resources