Google’s cloud platform offers many solutions for modernizing your existing database infrastructure. By moving to the cloud and taking advantage of Google’s PaaS offerings, you can reduce the headaches of database administration.
Cloud SQL is Google’s alternative to AWS RDS – a simple managed database solution for MySQL, SQL Server and PostgreSQL.
Instead of having to configure the database yourself, everything is managed for you and managed from the Cloud SQL Console. You will still have access to the database from your client applications as usual, but you do not have to worry much about updates, scalability or availability.
Pricing for Cloud SQL is simple, you pay a fixed fee per vCPU and GB of memory. Of course, this will be more than Compute Motor’s base pricing, so it’s still cheaper to configure MySQL or Postgres on your own server. But for many companies, the benefits of having everything handled for you (including much less stress on your DBAs) will significantly outweigh the price increase.
If you use your resources consistently for a month, you will qualify for a discount on sustainable use, which lowers the price significantly. Of course, this is also available on regular Compute Engine, but it’s worth remembering when running the numbers.
Cloud Spanner is also a managed SQL database, but it is built for a different purpose.
Traditional SQL databases, such as MySQL, have a common problem: they are only scalable vertically. If your database needs more performance, the best option is to upgrade the underlying instance. This is an issue that most NoSQL databases solve by design.
With Cloud Spanner, Google has found the best of both worlds and created a relational SQL-compliant database that can be scaled horizontally and easily manage global replication and consistency. Databases running on Cloud Spanner are shared across multiple regions, with all writings synchronized automatically. If you are curious about how this works under the hood, you can read this recipe by The Data Guy.
If you are set on a SQL database and want the absolute best solution, Cloud Spanner is your option. Google uses it internally and has tested it with petabyte data spread around the world.
Of course, with features this sleek and maximum performance, it is not cheap. You are charged every hour for each “node” in the network, each providing up to 2 TB of storage and 10,000 / 2,000 read / write queries per second. Nodes start at $ 0.90 every hour for
us-east1, so even with just one of them, you’re looking at a monthly bill of over $ 700.
Firebase / Firestore
Firebase is built to be an easy-to-use managed backend for your applications, with a special focus on mobile applications. Firebase as a whole is a complete app development platform with many useful functions such as authentication, analysis, performance and crash monitoring and managed storage.
However, the core is Firebase Realtime Database, a NoSQL document database built to enable real-time updates for customers who subscribe via WebSockets. Real-time synchronization of database data updates makes user collaboration easy and enables applications like Google Docs. Firestore is a similar feature used to store large objects such as uploaded photos and videos associated with the Realtime Database.
It’s completely server free, so you do not have to worry about database administration or creating instances at all. When it comes to pricing, it has a generous free level for small projects and development. After that, it’s salary that you go. You can use their calculator to estimate how much it will cost you.
If you want to learn more about Firebase, you can read our guide to get started.
Redis and Memcached are memory databases, which are commonly used to store small pieces of data with high throughput and very low latency. Most databases use memory as cache, but with Redis, all stored in RAM.
Memorystore is simply Google’s managed Redis and Memcached service, similar to Cloud SQL.
Pricing varies depending on how much data you store. For small distributions below 4 GB, you pay USD 0.049 per GB per hour. The hourly cost decreases for higher memory distributions.