I have deployed a .Net core app on App Engine Flex. My App Engine Flex is configured as Auto Scaling. My app is using Memorystore Redis. I want each instance to have their own Redis Slave (Memorystore Redis will be master) so that each instance can read from their local Redis instance which will improve the performance of the app. I am using the reference from https://github.com/docker-library/redis/blob/ede954da6de61f1d6a8572db4cd7bdf1278a2815/4.0/Dockerfile
How can I install and run Redis Slave on an App Engine Flex?
Thanks,
Google offers some tutorials that could help you accomplish what you want. The following might provide you with the information you need:
Connecting to a Redis instance from an App Engine Flexible Environment application
Connect to Redis from Node.js on App Engine flexible environment
I also recommend checking the High availability documentation and the Overview of Cloud Memorystore for Redis documentation for more information about the proper Redis configuration for high availability with Memorystore.
Related
I have setup a Memorystore Redis with my Nodejs in Google App Engine. I wonder though how would I access my redis instance so I can manually manage(like del) keys?
There is this doc accessing from Compute Engine but what about from GAE?
There is a similar tutorial on how to connect your App Engine to Cloud Memorystore that you could find here.
Basically the steps consist in setting up Serverless VPC Access and afterwards using the standard nodejs Redis library to interact with your Memorystore instance. Apart from this there are no more Cloud specific steps to follow, just write your code and have fun.
Separately, as filip26 pointed out you also have the Google Cloud Memorystore library, this is meant to manage Memorystore instances and configurations as you would do through the Cloud SDK or the Console. However they don'tserve to interact with the database in the sense of adding or deleting entries.
As a side note be aware that some Redis commands available in on-premises Redis servers are not allowed in Memorystore, you could find more about these limitations here.
We want to use an app engine flexible process to update our ElasticSearch index, which is on Google Kubernetes Engine. We need to connect to ElasticSearch via a http(s) address. What's the recommended way to do this? We don't want to expose the cluster to the external networks since we don't have authentication in front of it.
I've seen this SO post but both k8s and AE have changed a lot in the 2 years since the question/answer.
Thanks for your help!
The post you linked to was about App Engine Standard. App Engine Flex is built on top of the same Google Cloud networking that is used by Google Compute Engine virtual machines and Google Kubernetes Engine clusters. As long as you put the App Engine flex application into the same VPC as the Google Kubernetes Engine cluster you should be able to communicate between them using internal networking.
On the other hand, to expose a Kubernetes service to anything running outside of the cluster will require you to modify the service for Elastic search because by default Kubernetes services are only reachable from inside of the cluster (due to the way that the service IPs are allocated and reached via IPTables magic). You need to "expose" the service, but rather than exposing it to the internet via an external load balancer, you expose it to the VPC using an internal load balancer. See https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing.
in addition to Robert's answer, make sure that app engine and GKE are in the same region,
because Internal load balancers are not usable from other region.
check this https://issuetracker.google.com/issues/111021512
What is the advantage of using appscale when I can locally run app engine project on the server and forward it to my server's external IP to open it to the internet.
Also the resource requirement of appscale is way higher than that of the app engine.
Not sure I follow your question: AppScale allows you to run your app engine up on premise, or on another cloud provider if you so desire. How can you do that from GAE? Also usually our cost/requirements are cheaper for medium/large projects.
I was able to create the basic 'hello world' program.
When I tried to understand the difference between a cloud and a server I learned that Cloud is where you have an access to virtual instance created exclusively for you and you are free to choose and install software of your choice.Why Google App Engine(GAE) is used widely where as tomcat is not used. What are major differences between GAE and Tomcat?
Cloud is Google Cloud Platform at this case. App Engine is just one of their services.
App Engine is a platform to build your apps on top of it. A Platform As A Service or PaaS. It simplifies the process of building a scalable application, and you should use it when you understand what you really need and understand principles of scalable application.
Tomcat is a Java web container, and there're many alternatives. Google App Engine is using Jetty. You could actually use it with Tomcat by using Flexible VM, though it doesn't make much sense.
App Engine is not about web server, it's a set of services that helps you to build a scalable app. It includes Memcache, Datastore, Task Queue, Images API, deployments tools and versioning, CDN for static files, and most important automatic scale.
Actually you aren't limited to App Engine on Google Cloud Platform. There is more traditional service, like own server in the cloud, called Compute Engine. There you can run your Tomcat or anything else.
The documentation from Google is not really clear about it.
Here ( https://cloud.google.com/compute/docs/vpn/overview ) it says
Google Cloud VPN securely connects your existing network to your Google Cloud Platform (GCP) network through an IPsec VPN connection
Considering that Both Google App Engine (GAE) and Google Compute Engine (GCE) are part of Google Cloud Platform (GCP), it would mean that Google Cloud VPN works for both GAE and GCE.
Also, the section for Cloud VNP is at the same level than GAE and GCE in the project console :
But the documentation is located in /compute/docs which should not obviously be compatible with /appengine/docs
And here is a graph describing the tunnel, which talks only about GCE, which could exclude GAE :
So, is GAE compatible with Cloud VPN or is it restricted to GCE only ?
Google Cloud VPN securely connects your existing network to your Google Cloud Platform (GCP) network through an IPsec VPN connection. Therefore, only resources that are connected to GCP networks can communicate through Cloud VPN tunnels.
App Engine Flexible Environment is based on Google Compute Engine and consequently can connect to your remote network via Cloud VPNs. As described in this article, you can specify network settings in your app.yaml configuration file of your GAE Flexible application.
EDIT Rodrigo Torres has pointed out that this is NOW possible.
(Leaving up the old post below. It is now WRONG!!!)
OLD POST:
Google App Engine standard CAN'T use VPN directly, however the new Flexible Google App Engine (now officially released, no longer in beta) CAN use it directly. Just set up google cloud VPN and your network from the console and make sure to include the network in your app.yaml file.
Flexible App Engine is be the easiest way for new applications to utilize VPN connections since there won't be any migration headaches.
For a standard app engine application that can't be ported over to flexible for whatever reason, you CAN still use a VPN connection - however, it requires a service to be running on flexible app engine (or compute engine), and your app will need to interface with it somehow. This may be the simplest method, as migrating from standard to flexible is not the simplest of tasks. I know - I've done it.