Business analyst excel test LEARNOVITA

What is AWS Elastic Beanstalk? | A Complete Guide For Beginners

Last updated on 30th Jan 2023, Artciles, Blog

About author

Sweetha Manikam (Business Analytics Analyst )

Sweetha Manikam is the Sr.Business Analytics Analyst with 5+ years of experience. She has expertise in ABC analysis, SPI, Factory Overhead, R&D Capex, sunk cost, economic order quantity (EOQ), and EAC.

(5.0) | 19287 Ratings 2239
    • In this article you will get
    • What is Beanstalk?
    • Elastic Beanstalk features
    • Elastic Beanstalk components
    • Elastic Beanstalk web server architecture
    • Elastic Beanstalk worker environment
    • How does an Elastic Beanstalk and web application and worker communicate?
    • Conclusion

What is Beanstalk?

Elastic Beanstalk is the platform within AWS that is used for a deploying and scaling web applications. In a simple terms this platform as a service (PaaS) takes the application code and deploys it while provisioning a supporting architecture and compute resources required for a code to run. Elastic Beanstalk also fully manages a patching and security updates for those provisioned resources.

There are more PaaS solutions in a cloud computing space including Redhat Open Shift, Google App Engine, Scalingo, Python Anywhere, Azure App Service, however an AWS Elastic Beanstalk remains one of the leading of PaaS choices among app developers. There is no charge to use a Elastic Beanstalk to deploy the applications, only charged for a resources that are created to support the application.Can develop code in the number of languages which is then zipped up and a zip file is used when instantiating a new elastic beanstalk instance.

Supported language platforms includes are:

  • Ruby
  • Python
  • PHP
  • Go
  • Node.js
  • Java
  • .NET on Windows Server IIS
  • .NET Core on Linux
  • Packer Builder
  • Glassfish
  • Docker
  • Tomcat

A web servers are provisioned will be familiar to a most web developers and include an Apache, Tomcat, Nginx and IIS.Can still maintain a control over the compute instance type used by an elastic beanstalk when deploying the application to a cloud and can also keep control over a database type and level of an auto scaling required for application.

Can access a server log files of a deployed web application, update the application whenever required and enable a HTTPS on a load balancer when required.Using an Elastic Beanstalk platform delivers opportunity to spend a more time developing and less time managing a network, storage, o/s and compute runtimes as this is all handled by an Elastic Beanstalk. This leads to quicker deployment since all need to do is package up a code, feed it to Elastic Beanstalk and a platform takes it from there.

Don’t need to spend a time selecting compute instances, database and storage requirements, security, monitoring services, load balancing resources and so on which leads to be much faster deployment. And take care of the code and an elastic beanstalk does a rest.After deployment, an operations of a Elastic Beanstalk hosted applications is also easier. And no longer have to take on a role of monitoring servers, monitoring storage, managing network loads, keeping an operating systems up to date since this is all taken care of by a platform.

AWS Elastic Beanstalk

Elastic Beanstalk features

  • Elastic Beanstalk is a possibly the simplest and fastest way to deploy a web applications on AWS.
  • It allows to focus on writing a code instead of provisioning and also configuring AWS resources.
  • Elastic beanstalk handles a auto scaling of resources needed to support a deployed application as demand grows or shrinks.
  • When Elastic Beanstalk analyses a application and selects the resources that will be needs, it also allows to step in and select alternative resources that may be a better suited to be anticipated use cases it may not be know about. For example could select a higher spec EC2 instance type that better suits for needs.

Elastic Beanstalk components

Application:

Typically when create the application, will place all related assets like a code, resource configuration templates, code versions and required files in the folder. An Elastic beanstalk application is the similar concept, it is the entity that holds all related files, platform resources and configuration information to support application when deploy the application by elastic beanstalk.When create and deploy the new application or version, the application name will appear in an elastic beanstalk console.

Application Version:

When make changes to the application can deploy the updated application by elastic beanstalk. The application version are relates to a specific labeled iteration of deployable code for a web application.Within an elastic beanstalk, the application version is the link to an S3 object that contains a deployable Zip or Java WAR file.The named version will be appear as a new application should choose to deploy it into a various environment rather than deploying from within an existing application.

Environments:

When deploy the application with elastic beanstalk, an environment is created to house of version of the application are deploying. The environment hosts are required EC2 instances, storage, load balancer, autoscaling groups or anything else required by this version of application.A single environment can only run one version of a application. Andcan deploy a new version over the top of an existing application environment, like say production, however also have a flexibility to install to an alternative environments like development, staging or testing environments.Every environment will have a unique URL to access a running application.

Environment Tiers:

There are the two tiers instantiated when can deploy an application by elastic beanstalk.The Web Server environment tier is a front facing segment that responds to a http requests from users accessing an application URL.

Environment Health:

Elastic beanstalk monitors a web server application and worker environments and performs a health checks on how application is running.

The health of an environment is reported for using a colour codes for instant visual recognition that all is well, or not.

Grey: Lets know an environment is being updated or is still being provisioned.

Green: An environment is healthy and has passed its a latest health check.

Yellow: An environment has failed to one or two recent checks

Red: An environment has failed to three or more recent health checks.

Working of AWS Elastic Beanstalk

Elastic Beanstalk web server architecture

When deploy an application using a elastic beanstalk to a web server environment the environment will typically create a following architecture structure.

  • An Elastic Beanstalk environment.
  • An Elastic load balancer.
  • An auto scaling group.
  • EC2 instances.
  • Host manager.
  • Security groups.

The Elastic Beanstalk environment is a container for this unique version of the application and it offers a cname and URL entry point for the users to access application.The elastic load balancer distributes a http requests to EC2 instances that have been provisioned within an environment.The Auto Scaling Group will scale in and scale out of number of EC2 instances that exist within an environment based on traffic load. And can specify how many EC2 instances that want to start with and how many of will allow the auto scaler to instantiate within settings of the elastic beanstalk environment.

The EC2 instances are compute images that run a workloads. Elastic beanstalk will suggest a size and type of EC2 instance, however can manually change these instance types to increase or decrease a CPU capacity and reserved memory should anticipate the higher or lower compute power will be need to adequately provide an acceptable application performance for the users.The host manager is a present on each of EC2 instances and is responsible for a monitoring and reporting on performance of application, reports on a resource instance level events and sends logs to cloudwatch dashboard.

Elastic beanstalk worker environment

A worker environment is created to the process specific background tasks, but will also be created to assist a web server application when it is under load.When a web application is a processing a time-intensive task in response to the user request, should a second user make request the user will need to wait and there is a possibility that a request will time out.

How does an Elastic Beanstalk and web application and worker communicate?

When a web server detects a request is taking too long, subsequent requests are be passed by SQS message to a SQS queue. The worker environment has a daemon running that polls are be SQS Queue and retrieves SQS messages sequentially for a processing. The worker environment then returns a http responses back to a client that made the request.

Conclusion

AWS Elastic Beanstalk allows to quickly deploy applications and also services without having to worry about a configuring underlying resources, services, operating systems or a web servers.Elastic Beanstalk takes care of a hosting infrastructure, coding language interpreter, operating system, security, https service and application layer.

Are you looking training with Right Jobs?

Contact Us

Popular Courses