Okay, so now let's talk about
Elastic Beanstalk.
So, so far in this course,
when we've been deploying an application,
we've had the same architecture.
So we have a load balancer
that is taking all the requests from our users,
and then we have an auto scaling group
with multiple availability zones.
And in each AZ,
there will be some EC2 instances being deployed there.
And then in the backend, we have maybe some DATA subnets,
so we have an RDS database.
We take the reads and the writes.
Maybe we'll have some root up you guys and so on.
And then if we need a caching layer, we, the caching layer,
we need to look at elastic cache. Okay.
So they've,
there are so many applications for us to deploy and they
follow the same architecture.
It may be a pain to recreate it every single time.
So as a developer,
it's complicated to manage infrastructure,
to deploy code it don't,
we don't want to be configuring all the databases,
the load balancers, et cetera, et cetera.
And of course we want everything to be scaling.
So as we can see,
most of the web applications will have the same architecture
with a load balancer and an auto scaling group.
And as a developer,
all I want to do is for my code to run, okay?
I don't want to worry about everything else.
So, also if I develop in different programming languages and
have different applications and environments,
I possibly want a single way of deploying my application.
And this is where Beanstalk comes into play.
So Beanstalk is a developer centric view of
deploying on application on AWS.
The idea is that from one single interface is going to reuse
all the components we've had seen before,
such as EC2, ASG, ELB, RDS,
but it's going to be a managed service that will deploy all
these things for you.
So it will handle the capacity provisioning.
It will handle the configuration, load balancer,
the scaling, the application, health monitoring,
the instance configuration and so on.
And the only responsibility for you as a developer is going
to be the code itself. Okay.
You still have full control over the configuration of each
component, but at least it comes
bundled as one single interface in Beanstalk and the idea
is that Beanstalk also as a really cool way of updating
applications. So the Beanstalk service is free on its own,
but you're going to pay for the underlying instances that
are going to be leveraged by
Beanstalk or your ASG or your ELB, these kind of things.
So components of Beanstalk consist of an application,
which is a collection of Beanstalk components,
which has environments, versions and configurations.
A version of the application itself is an iteration of your
application code. So you can have version one, version two,
version three, et cetera, et cetera.
Then an environment, it's just a collection of your
resources running the specific application version.
So you can only have one application version at a time in an
environment where we can see, we will see,
we can actually update an application version within an
environment from version one to version two, we have tiers.
So we can have two different tiers in Beanstalk.
We have the web server environment tier and the worker
environment tier, we'll see those very quickly.
And we can also create multiple environments in Beanstalk,
such as dev, test and prod and whatever environment you
have in mind really.
So the process is to create an application.
Then we upload a version.
Then we are going to launch an environment,
and then we're going to manage the environment life cycle.
And if you wanted to iterate on that,
we could update the version by uploading a new version and
then deploy that new version again
in our environment to update our application stack.
So Beanstalk supports many programming languages such as Go,
Java SE, Java with Tomcat, .NET Core on Linux,
.NET Core on Windows Server, Node.js, PHP,
Python, Ruby, Packer Builder, Single Docker Container,
Multi Docker Container, Preconfigured Docker.
And if your programming language is not here,
you can create your own custom platform, which is advanced.
So the idea is that on Beanstalk,
you should be able to deploy pretty much anything.
Now to finish,
what do I mean by server tier and worker tier,
well the web tier is looking like this,
this is the traditional architecture that we know.
Well, we have a load balancer,
and then it's sending traffic to an auto scaling group that
has multiple EC2 instances that
are going to be your web servers.
This is the architecture number one with Beanstalk.
And the architecture number two with Beanstalk is going
to be around a worker environment.
So this time there's no clients accessing directly your
EC2 instances, we're going to use an SQS queue,
which is a message queue,
and the message will be sent into the SQS queue.
And the EC2 instances are going to be workers because
they're going to pull messages from the SQS queue to process
them.
And in this case, the,
or the worker environment is going to scale based on the
number of SQS messages. So the more messages,
the more EC2 instances.
And then the cool thing is that you can put the web
environment and the work environment together by having the
web environment
push some messages into the SQS queue of the worker
environment.
So that's it for an overview of Beanstalk.
I will see you in the next lecture for some hands-on.