I was wondering how many threads can app engine support since I need it to calculate how many WebSocket connections I can support per instance.
Somewhere I read there are no threads, somewhere that you can use but no max number listed.
So can a single app engine instance support for example tomcats default 200 threads?
And if not what GCP service do you recommend for hosting such an app?
To create a connection with websocket you can have a look at this documentation.
And about the number of thread limits, you can specify by defining max_concurrent_requests as discussed in similar thread. It is also defined in the document, that the maximum limit of max_concurrent_requests is 1000.
If you are willing to check on other services provided by GCP, you can choose Cloud run or Google Kubernetes engine for containerized applications as mentioned here and also you can consider an option of installing tomcat on virtual machine.
Related
Our project was running in GCP compute engine. For scaling purpose, it is moved to app engine. We had rabbitmq implemented for push messages and chatbots in compute engine. In app engine it is not feasible to implement rabbitmq. So I was going through alternate options. There I found cloud task option. But I have doubts in certain areas even after reading their documentation
In my understanding, we need an app engine instance for cloud tasks. In that case, can I implement it in same project itself as a different service? Will this affect the performance of the existing project?
Is there any better solution than cloud tasks in this case?
You can implement additional services under your app in the App Engine as shown in this diagram.
By default, App Engine scales your app to match the load. Your apps will scale up the number of instances that are running to provide consistent performance, or scale down to minimize idle instances and reduces costs.
You can consider running a RabbitMQ Cluster on Google Kubernetes Engine. You can find more information in the following documentation: rabbitmq.
Question:
Is there a way to Specify Zone for Google Cloud App Engine Flexible Environment to reside in? If not, what are the alternatives?
Context:
I'm having a setup where I use App Engine to write and reads to Bigtable. However I noticed a performance decrease, and during the debugging, I found a documentation from Google stating:
There are issues with the network connection. Network issues can reduce throughput and cause reads and writes to take longer than usual. In particular, you'll see issues if your clients are not running in the same zone as your Cloud Bigtable cluster.
In my case, my client is in a different region, by moving it to the same region had a huge increase in performance. However the performance issue still exist, and the recommendation from the documentation is to put client in the same zone as Bigtable.
I also considered using Container engine or Compute Engine where it is easier to specify the zone, but I want stay with App Engine for its autoscale functionality and managed services.
App Engine is a regional service:
App Engine is regional, which means the infrastructure that runs your
apps is located in a specific region and is managed by Google to be
redundantly available across all the zones within that region.
Taken from here.
You could indeed use GKE or GCE, while you're correct that these are not managed services like App Engine is, they do both support autoscaling.
Usually we deploy BPEL business processes on Apache ODE or WSO2 BPS Server included in Tomcat server, can I deploy a business process on Google App Engine's Web Server? Actually I haven't any idea about that!
There is a lot more to running a BPEL process than it seems. You would not deploy the BPEL process, you would deploy Apache ODE to Google App Engine.
Unfortunately, last I checked App Engine has stringent restrictions on the number of threads a program can spawn, making Apache ODE unusable (see 0(their doc)):
The secured "sandbox" environment isolates your application for service and security. It ensures that apps can only perform actions that do not interfere with the performance and scalability of other apps. For instance, an app cannot spawn threads in some ways, write data to the local file system or make arbitrary network connections. An app also cannot use JNI or other native code. The JVM can execute any Java bytecode that operates within the sandbox restrictions.
you can't. See Google app engine's documentation.
[1] https://developers.google.com/appengine/docs/
[2] https://developers.google.com/search/results?q=BPEL&p=%2Fappengine
i wanted to create a multiple instances of my application in either google cloud or EC2. I have two queries regarding this
1.How to achieve this?
Can we create a virtual instances by using zookeeper?
Google App Engine instances are started automatically, as your traffic raises. You may also have always on instances or backends instaces. Just read the docs: http://code.google.com/intl/pt-BR/appengine/docs/adminconsole/instances.html
Google App Engine is not adequate to use with Zookeper. Since Java code runs in a limited sandbox, you may not be able to communicate with Zookeper at all. Also, you will have to start and end you backends programmatically, leading you to lots of work.
As for EC2, see this:
http://www.mail-archive.com/zookeeper-user#hadoop.apache.org/msg01083.html
is it possible to host multiple apps in GAE using single google account.
You can host as many as ten application on GAE for a single account for free. Each application can have n number of serving version provided they don't go beyond free usage quota. To know more about free usage quota in GAE. You can have a look here
As far as I remember you can have max 10 projects per account in your appengine. The trick is you can configure your applications to communicate with each other and exchange data through some REST integration they way most web services work either xml or json are solid solutions for the proble. Send more specific inquiries if you have.