Hosting a web app on Google Cloud using GCE (Get Cooking in Cloud)

to Get Cooking in Cloud, where we shared the best recipes
to apply in your cloud kitchen. I am Priyanka Vergadia. And in this episode,
we will talk about creating websites
on Google Cloud using virtual machines. [MUSIC PLAYING] Listen. One of the great things
about being an engineer is that we get to have complete
control over so many aspects of the things we develop. And for a lot of
you out there, this extends to the websites
you develop too. Let’s say you need
something more advanced than a static site
but need more control than what our managed services offer. To get more control
for the same power, you can use Compute Engine. It is important to note
that a well-designed web application should scale
seamlessly as demand increases and decreases and be able
to withstand the loss of one or more compute resources. But a truly resilient and
scalable web application requires planning. Let’s see how to build one. When a user requests your
website in the browser, their request ends up
on your DNS provider. In this case, we’re
using Google DNS, which is a highly-available
domain name service. The network traffic is
routed to infrastructure running on Google Cloud. If you use your
own DNS provider, then the request will
land there first. And then the DNS provider routes
the traffic to Google Cloud. Then if the request is for
content that is cached, it is delivered by CDN. In this architecture,
we’re using Cloud CDN, a global
network of edge locations. Requests are automatically
routed to the nearest edge location. So content is delivered
with the best performance. You can integrate with any other
third-party CDN of your choice as well. Static content used
by the web application is stored on Google
Cloud Storage, which is a highly durable storage
infrastructure designed for mission critical and
primary data storage. HTTP requests are first handled
by Cloud Load Balancer, which automatically distributes
the incoming application traffic amongst multiple
Compute Engine instances. If you use HTTPS,
the SSL session is terminated at
the load balancer and requires at least one
signed SSL certificate. Web applications, including the
application server and the web server, are deployed
on GCE instances. Deployment and scaling
is done automatically and seamlessly by using
instance templates. An instance template is
a specific customized configuration of Google
Compute Engine instances that facilitates the reuse
of instance configuration by using managed
instance groups. To learn more about
instance groups, check out the next episode. To store application data,
you would use a database. The relational database used
in this example is Cloud SQL. Cloud SQL is a fully-managed
database service that makes it easy to
set up, maintain, manage, and administer your
relational data in cloud. It automates all your
backups, replication, patches, and updates. Now, that you know how the web
application architecture is set up, what happens if your
website gets really popular and the traffic grows from
hundreds to millions of users? Well, we need to make sure that
our application can gracefully handle peaks and
dips in our traffic. One way to increase
capacity to handle peaks is to scale vertically by
adding more CPUs and memory to the same instance. This means that
vertical scaling will be limited based on the
capacity of a single machine and its size. Horizontal scaling,
on the other hand, is a better option for
high-availability applications because it allows you to scale
the number of compute resources dynamically as the
demand increases. The idea that the
application’s resources can increase or
decrease requires that it has the means by which
you can add or remove instances from service. But how does adding or removing
instances automatically work? Tune in to the next
episode to find out. Today, we learned how to deploy
a web application on Google Cloud using Compute Engine. That’s all for today on
Get Cooking in Cloud. Here’s hoping you can
whip up something great. Join us next time because
we will share the recipe to scale your Compute Engine
applications to millions of users. If you like this
video, then check out the previous episodes too. And to see more
such content, don’t forget to like and
subscribe to our channel. [MUSIC PLAYING]

5 Replies to “Hosting a web app on Google Cloud using GCE (Get Cooking in Cloud)”

Leave a Reply

Your email address will not be published. Required fields are marked *