DINA PORTMAN: Hey, Martin, what are you wearing?
MARTIN OMANDER: Oh hi, Dina.
This is from an e-commerce startup.
Their dev team is evaluating Cloud Run
for nine different types of workloads.
I told them we'd find the answers for them.
DINA PORTMAN: Sounds great.
Stay tuned if you want to know more.
[MUSIC PLAYING]
MARTIN OMANDER: Artizanship connects rural artisans
with consumers worldwide.
My new hat came from Ecuador.
Their dev team is excited about Cloud Run,
but they aren't sure if it's a good fit for them.
Here, I have a list of nine types of workloads.
Dina, could you tell me if Cloud Run would be
a good fit for those workloads?
DINA PORTMAN: Sure, I'll do my best.
What's the first one?
MARTIN OMANDER: OK, they want to build
private microservices that communicate
with each other asynchronously.
DINA PORTMAN: Cloud Run would be a great fit.
It would scale each service up and down, independently
and automatically.
The services would communicate securely with each other
through Cloud Pub/Sub.
And the service endpoints would be secured by authentication.
If they prefer services to explicitly call other services,
they should use Cloud Tasks instead of Pub/Sub.
The calls are still robust and asynchronous,
but developers get more control over things like retries,
scheduling, and rate limits.
MARTIN OMANDER: All right, workload number two,
a public REST API using HTTPS.
DINA PORTMAN: Oh, easy.
They go to REST Service in Cloud Run which provides an HTTPS
endpoint out of the box.
They can also add their own custom domain on this endpoint.
MARTIN OMANDER: All right, workload number three,
scheduled maintenance jobs.
DINA PORTMAN: They can trigger their Cloud Run services
from Cloud Scheduler.
Cloud Scheduler is also serverless,
and it uses the standard Unix cron format.
MARTIN OMANDER: All right, workload number four.
They get data feeds from suppliers in different formats.
The data needs to be transformed and loaded into their database.
DINA PORTMAN: It's easy to build ETL services in Cloud Run
and trigger them when files are uploaded to Cloud Storage.
Another alternative would be to let Cloud Data Flow send
each record to their Cloud Run ETL
service as a Pub/Sub message.
MARTIN OMANDER: All right, workload number five.
Oh, they need a public website, of course.
DINA PORTMAN: Well, they can run a web framework, like Flask
or Express, on Cloud Run.
If their website runs on a software package,
they may be able to use Cloud Run.
WordPress, for example, works on Cloud Run,
but it requires extra configuration.
The team should also check out App Engine,
which is a mature product for building scalable web apps.
Many content management systems are also
available in the GCP Marketplace.
From the Marketplace, you can deploy
production-grade solutions to Compute Engine
with just a few clicks.
There are images for WordPress, Magento, Joomla, Drupal, et
cetera.
MARTIN OMANDER: All right, workload number six.
Oh, one of their microservices create product images
using a binary library.
DINA PORTMAN: Oh, Cloud Run can do that.
They would package up the binary in a Docker container
and call it from the code.
MARTIN OMANDER: Very well, workload number seven.
They also render video files of some of their products.
These jobs can take hours to run.
DINA PORTMAN: Well, a Cloud Run job
can run for a maximum of 60 minutes.
Some long-running jobs can be split into shorter jobs,
and this may simplify the code and enable parallel processing.
But if their jobs can't be split up
and if they take more than 60 minutes,
the team should use Compute Engine or Kubernetes Engine.
MARTIN OMANDER: All right, workload number eight,
off-the-shelf software package for their finances
and warehouse management.
DINA PORTMAN: Any software or binary
that can run in a Linux container
and does not store data on disk can run in Cloud Run.
If their finance or warehouse software
can't run in a Linux container, they
can run it on Compute Engine, instead.
MARTIN OMANDER: All right, workload number nine,
the final one.
This is a product recommendation engine
that will use machine learning.
DINA PORTMAN: They should use Recommendations AI
or another product in Google's IA platform.
But a Cloud Run service can still
call those services to get recommendations or even run
custom machine learning models.
MARTIN OMANDER: Well, those are all nine services.
You seem awfully well-prepared, Dina.
Did you peek at my list?
DINA PORTMAN: Well, perhaps, but only a little.
MARTIN OMANDER: [LAUGHS] We hope you enjoyed this episode.
[MUSIC PLAYING]