I read an official app engine article (which explains how to deploy micro services on app engine) and implemented a simple app. The problem is calling one module from another via URLFetch takes almost two seconds. I checked the log and found the 90% of the time was consumed by urlfetch. I used appspot.com domain as the doc suggested. I have no clue why it's so slow. Anyone facing the same problem?
Related
I have a relatively small Java app, which I'd like to move over to the Google App Engine. It runs in the console, with no user input needed after the initial startup. I researched a bit on how to deploy it, but all tutorials seem to focus on Java web apps, when I don't really need that. Is it possible to deploy my app if it's not a web app?
App Engine is probably the wrong GCP platform for you - you'd probably be better served just deploying your jar directly onto a Google Compute Engine node. GAE is pretty explicitly oriented around web applications and you'd need to do a bunch of configuration in order to have it work for your use case.
Does your non-web Java app handle web requests? If not, it seems difficult to imagine that you would be able to reach your deployed app and use it for any purpose, once deployed. Your Java app should be able to handle requests, to make deployment worthwhile, and the deployed app useful.
You may find out about how your app should handle requests by reading the How Requests are Handled documentation page.
Im creating a Node.js website that probably won't have loads of traffic, and was looking into cheap solutions to host the site. Came across Google cloud services offering free usage for their services with limits. A f1-mirco is more than enough for my needs, but I will happily pay for some usage if it goes over by any chance.
I wanted to setup a linux centOS 7 on GCE (which I already did), and run my application and REST API on it. Now here comes the problem.
I tried to use Google's datastore service, but it sprung an app engine instance and without it datastore won't work.
Is datastore entirely relying on app engine to function?? In the docs, it said if you use any of the client API, it requires app engine. What can I do to not use the client api and query data then? Don't want to use the app engine at the moment or datastore is just not for me then?
Thanks for any help!
Some of the underlying infrastructure of Cloud Datastore and App Engine are still tied together for creation, etc. So while creating an Cloud Datastore database also defines an App Engine instance for the project, it doesn't require you to use it. You don't get charged for App Engine either, unless you decide to deploy an App using it.
You should be totally fine use the Google Cloud Node client library on the f1 micro instance.
We run 2 apps on Google AppEngine, one in Python, and one in Java.
The Python app faces the internet and serves browser users or API calls from our smartphone app.
The Python app often communicates with the Java app, which offers workflow engine services.
The Java app is never accessed directly from the internet. This is similar to a service oriented architecture.
Our Java app is configured with 1 resident instance.
However, we often see that when the Python app sends a request to the Java app (which is doing nothing at that moment), that a new Java instance is spawned, instead of having the resident instance serve the request. This way, latencies up to 10 seconds were discovered, whereas the request handling itself takes less than 1 second.
Could it be possible that Google considers a request from one appengine app to another one, as a sort of backend workload, for which throughput is more important than latency? Are there different policies for requests coming from the internet versus requests coming from Google internally (defered methods, cron, ... maybe inter-appengine requests also resorts in this category, which is maybe not always correct).
Google recommended me to run the Java app as a backend of the Python app, and in fact have only 1 single Appengine app, instead of 2.
Some information in this thread:
https://groups.google.com/forum/?fromgroups=#!topic/google-appengine/8O7K3cFzBbY
Any advice on how to force appengine resident instances handle incoming requests, rather than spawn and warm up new instances, which might be good for throughput, but bad for latency?
Have tried to add <threadsafe>true</threadsafe> element to appengine-web.xml on your java app?
I'm wondering if anyone knows any script in Python or Java to setup Google App Engine as Load Balancer server?
I choose GAE, because of 100% uptime and free, so it would be the best to setup as Load balancer.
So what I want to do is set up a GAE app (a load balancer application) in "www.domain.com" - using Google Apps, it will share the load to all my servers (with round-robin, or any technique), but when all servers are down, show maintenance page which is host in GAE.
Is this possible?
You could do it, but you'd
incur extra latency by requiring an extra hop from google app engine to your servers
have all your servers public to the web, since otherwise google app engine won't be able to redirect to them Edit: apparently this is incorrect. See Nick Johnson's comment below!
have to implement something in google app engine to keep track of what servers you have up and how and when to route to them
Seems like it might not be worth it, but it'd be cool if you did it and posted some numbers about how it works!
I am running a live system that is currently serving about 20K pages a day which is based on App Engine Helper (Python) with session support provided by AppEngine utilities.
One problem that I have been having is that sessions are occasionally randomly logging out. I would like to try using the App Engine Patch, since it has "native" django session support, but I am worried that this is possibly going to be like doing a brain transplant. Specifically, current database models are all inhereted from BaseModel provided by the App Engine Helper. While, App Engine Patch does not have this inheritance.
Does anyone know if it is possible to migrate a live system from App Engine Helper to App Engine Patch? If so, do you have any advice or warnings that I should heed, before attempting this transition?
Thank you and kind regards
Alex
After further investigations, I discovered that newer versions of Django and App Engine Helper have built in support for sessions. After migrating to this system, my problems of randomly losing sessions have been resolved.
Alex
You should think about porting your system not to App Engine Patch but to Django-nonrel (by app-engine-patch authors).
I moved from google-app-engine-django and app-engine-patch to Django-nonrel is because first two are not maintained any more.