[MUSIC PLAYING]
SPEAKER: Welcome to this video, where we'll discuss
database options for GKE users.
We'll cover what your options are
and focus on two managed databases, Cloud SQL and Cloud
Spanner, and see whether these might be right for your cluster
requirements.
Before we continue, you should already
be familiar with what stateless and stateful applications are,
as well as the differences between relational and
non-relational databases.
Now, there are different types of workloads
you can run in GKE, including stateless
and stateful applications.
If you're using stateful applications in your cluster,
then you'll need a database, as these apps need to store data.
Let's review the options you have
for running a database on the Google Cloud platform.
You could opt for a self-managed database,
a database on GKE itself, or a fully managed database.
In this video, we'll focus on fully managed databases.
Compared with the other two options, this type of database
requires the least effort from you to operate and manage.
You just need to create the database, build your app,
and Google Cloud takes care of the rest--
installation, upgrades, storage, as well as
many of the maintenance tasks, like backups and scaling.
This option makes it a lot easier to deploy and scale
your database servers.
Google Cloud provides several database options
to cover all database use cases, from
relational to non-relational database needs,
and even in memory.
Each database has its own features,
and the type you'll need depends on your specific use case.
If you're looking for a database option for your GKE clusters,
Cloud SQL and Cloud Spanner are great choices.
Using a fully managed database server outside your GKE cluster
can make your applications more highly available
and allows for more complex scenarios,
like having your apps spread across multiple clusters.
Both Cloud SQL and Spanner are fully managed services
with a high level of availability, scalability,
and performance.
So how do you know which database
fits your needs better?
Let's take a look at two fictitious organizations.
E-Z Shop is a Finnish-based e-commerce company
using GKE to host the services they build.
They want to migrate their thousands of databases
from their on-prem data centers to Google Cloud
with minimal downtime and want to easily connect
to the database from GKE.
Their developers are familiar with PostgreSQL,
so E-Z Shop would prefer a managed database that
is compatible with this system.
Game Wizards is a company that uses GKE to build games.
For them, data integrity and availability
are critical needs for a database.
They don't want to spend too much time on administration
or scalability issues.
Rather, they prefer to focus on game development and user
experience.
Game Wizards is launching a new game shortly
and anticipates a huge increase in player base
across the globe over the next few months,
so they are looking for a database that
can handle massive amounts of data
with extremely low latency.
Cloud SQL is a good choice for E-Z Shop,
as it provides a fully-managed environment
for a specific database engines, including PostgreSQL.
It's the more cost-effective choice
for an organization that requires
a high level of availability and performance
but doesn't need to scale beyond a single region.
On the other hand, Cloud Spanner is a good fit for Game Wizards.
They need a globally distributed relational database
that can handle large amounts of data for a successful game
launch.
With Spanner, there is no fixed size limit,
so it can grow as the business grows.
You can see from these examples how Cloud SQL and Spanner can
serve different business needs.
Spanner is unique, as it has the benefits
of relational databases with the horizontal scalability you
would normally expect from a non-relational database.
It's best suited for apps such as gaming,
retail banking, payment solutions--
any large-scale global applications
where you require unlimited scalability and strong
consistency.
Cloud SQL is more suited for smaller-scale database
requirements, such as general-purpose web frameworks,
e-commerce apps, and so on.
Whichever platform you choose, though, both database options
offer easy integration with GKE.
First, you'll set up a database instance
and create the database.
Then you'll set up a service account
that will be used by GKE to connect
to the database of your choice.
Once you deploy your applications
in the GKE cluster, they will connect
to the database instance.
Using a fully managed database in Google Cloud
simplifies the process of provisioning and maintaining
the database and frees up your resources
so you can focus on building your applications.
For more detailed steps on how to connect your GKE
applications to either Cloud SQL or Cloud Spanner,
check out our documentation.
Thanks for watching.
[MUSIC PLAYING]