MARK MIRCHANDANI: There are lots of ways to host an application.
But how do you know which makes the most sense for you
and your company?
Join us as we talk with Thunkable
about how they made it happen on this episode of "Stack Chat."
Mike, thanks so much for joining us.
Can you tell us a little more about what Thunkable does?
MIKE GALLAGHER: Sure.
Thunkable is a platform that allows you to build
mobile apps without code.
So if you're a person that has an idea,
and you're not an engineer, which not everyone is,
you can snap some blocks together, drag some components
onto the screen, and bring your idea to life.
And we have about half a million users
and about a million apps built.
MARK MIRCHANDANI: OK.
Can you tell us a little bit about,
from the architecture side, how Thunkable managed
the server-side application that people then
use to build their own applications?
MIKE GALLAGHER: Sure.
We started off with a pretty simple architecture.
We had a small user base.
Just trying to get it out there.
So we had a single instance connected to a cloud Mongo
and cloud Redis.
And the database is scaled automatically,
but that single instance led to some issues.
There was a manual deploy.
So whenever we deployed, it went down.
And also, if you had an unhandled exception,
it would bring down the whole server.
MARK MIRCHANDANI: So I think this is a common problem
that a lot of startups and small teams
run into as they try to focus on the application
and don't, unfortunately, spend as much time
on the infrastructure.
How did your team choose to address these problems?
MIKE GALLAGHER: We pretty quickly
realized we needed multiple instances,
so we spun up a couple more.
But we were still doing manual deploys.
And so now we had to do three of them.
And it was great that we had less downtime-- that's
super important-- and that the exceptions weren't taking down
the entire service, but it was taking too much time.
So we quickly went to a Docker build,
which allowed us to automated build that we
can build on our own machines.
We'd push it to Google Cloud, and then just
deploy it to each of the instances manually.
And then shortly after that, we realized that Kubernetes
could do this for us.
So we just allow Kubernetes to deploy our images to as
many instances as we need.
MARK MIRCHANDANI: So now you're using managed infrastructure.
And you get all the benefits of that,
but it sounds like you're still doing the build manually.
MIKE GALLAGHER: Correct.
It took about a half an on our local machines.
So we took a look at a Google Cloud Build, and we got it up
and running there.
And it wasn't necessarily faster,
but we weren't sitting there watching
it, which is basically faster.
So the other thing was before, we weren't exactly
sure what was on production.
It was kind of up to us to make sure
that we deployed the right stuff.
But now we just tag our master branch,
and then Google Cloud Build kicks off and deploys it
to our staging environment.
So it's quite a bit easier.
MARK MIRCHANDANI: So it sounds like your team
learned a lot over time and then implemented those changes.
But if you knew everything you knew now back then, what would
you have done differently?
MIKE GALLAGHER: The first thing I definitely would have done
was just started with Docker and Kubernetes.
It was nice to live through the pain points that it solved,
but I could have watched a three-minute video.
One thing we did do right was every few weeks,
we'd look at our DevOps process and see where our pain points
were and try to address them.
And some of the things that we've fixed recently
is our Docker build, we've added Docker layer caching,
so that we can speed up our builds from, like, 30
minutes to five minutes if it's just a quick back end fix.
So that's been really helpful.
The other thing is making our Docker image much smaller
has led to faster employments.
And we did that with multi-stage builds,
which allow the final product to have just what it
needs to run in production.
And having faster deploys is really important
when you're constantly pushing things
and want the ability to quickly deploy
a hot fix or new features.
MARK MIRCHANDANI: Thank you so much for coming in here
and telling us about how your team navigated both maintaining
the application and improving the infrastructure
at the same time.
MIKE GALLAGHER: Any time.
MARK MIRCHANDANI: Want to try using Google Cloud Build
and Kubernetes for yourself?
Check out the tutorial in the description
to get some hands-on experience.
Thanks for watching.
And make sure to subscribe for more great Google Cloud
Platform content.
We'll see you next time on "Stack Chat."
[MUSIC PLAYING]