It's easy to get started developing Ruby on Rails apps that run on Google Cloud. Because the apps you create run on the same infrastructure that powers all of Google's products, you can be confident that they can scale to serve all of your users, whether there are a few or millions of them.
There are three main options for deploying Rails on Google Cloud.
|Rails deployment option||Use if you want||Don't use if you need||Get started|
|App Engine flexible environment||
||Total control over the underlying virtual machines.||Rails on App Engine flexible environment|
|Google Kubernetes Engine (GKE)||
||A fully-featured platform-as-a-service (PaaS). For a container-based PaaS, consider App Engine flexible environment.||Rails on GKE|
||A serverless environment without the need to configure your own infrastructure||Rails in Compute Engine|
Rails Active Record works best with a traditional SQL database. If you are starting a new project, Cloud SQL is a good choice. With a few clicks you can create a MySQL or PostgreSQL database that is fully managed and scaled by Google, with no management on your end. Review the Using Cloud SQL for MySQL with Rails 5 tutorial or the Using Cloud SQL for PostgreSQL with Rails 5.
In many situations, there are compelling reasons to use a NoSQL database, for example, scalability or suitability for your data model. Although using Rails models with a NoSQL database can be challenging, it is possible with some limitations. For example, you can express many types of database joins in Rails, but joins aren't supported by Datastore or other NoSQL databases such as MongoDB. You can learn more by reviewing our Rails Bookshelf tutorial using Datastore, which uses Datastore as its non-relational database. For a managed, massively-scalable NoSQL solution, consider Datastore, which is a non-relational database that often scales better than a SQL solution.
To install Memcached on Compute Engine, you can use Cloud Marketplace. To install Memcached on either Compute Engine or GKE , you can use the Memcached Docker image. Similarly, you can install Redis by using Cloud Marketplace or the Redis docker image.