Sunday, 3 July 2022

Elastic Bean Stalk Theory

 

AWS Elastic Beanstalk Components

There are certain key concepts which you will come across frequently when you deploy an application on Beanstalk. Let us have look at those concepts: 

Application:

  • An application in Elastic Beanstalk is conceptually similar to a folder
  • An application is a collection of components including environments, versions and environment configuration

Application Version:

  • An application version refers to a specific, labeled iteration of deployable code for a web application
  • An application version points to an Amazon S3 object that contains the deployable code such as a Java WAR file

Environment:

  • Environments within Elastic Beanstalk Application is where the current version of the application will be active
  • Each environment runs only a single application version at a time. But it is possible to run same or different versions of an application in many environments at the same time

Environment Tier:

Based on requirement beanstalk offers two different Environment tiers: Web Server Environment, Worker Environment


  • Web Server Environment: Handles HTTP requests from clients
  • Worker Environment: Processes background tasks which are resource consuming and time intensive

Here is an illustration to show how Application, Application version and Environments relate to each other:

AWS- Elastic-Beanstalk-Application-EdurekaAnd here is how Beanstalk Environment using default container type looks like:

AWS-Elastic-Beanstalk-Environment-Edureka
Now that you know about different key concepts pertaining to Elastic Beanstalk, let understand the architecture of Elastic Beanstalk.

AWS Elastic Beanstalk Architecture

Before getting into AWS Elastic Beanstalk architecture, let’s answer the most frequently asked question,

What is an Elastic Beanstalk Environment?

Environment refers to the current version of the application. When you launch an Environment for your application, Beanstalk asks you to choose among two different Environment Tiers i.e, Web Server Environment or Worker Environment. Let’s understand them one by one.

Check out our AWS Certification Training in Top Cities

IndiaUnited StatesOther Countries
AWS Training in HyderabadAWS Training in AtlantaAWS Training in London
AWS Training in BangaloreAWS Training in BostonAWS Training in Adelaide
AWS Training in ChennaiAWS Training in NYCAWS Training in Singapore

Web Server Environment

Application version which is installed on the Web Server Environment handles HTTP requests from the client. The following diagram illustrates an example AWS Elastic Beanstalk architecture for a Web Server Environment tier and shows how the components in that type of Environment Tier work together.

Beanstalk Environment – The Environment is the heart of the application. When you launch an Environment, Beanstalk assigns various resources that are needed to run the application successfully.

Elastic Load Balancer – When the application receives multiple requests from a client, Amazon Route53 forwards these requests to the Elastic Load Balancer. The load balancer distributes the requests among EC2 instances of Auto Scaling Group.

Auto Scaling Group – Auto Scaling Group automatically starts additional Amazon EC2 instances to accommodate increasing load on your application. If the load on your application decreases, Amazon EC2 Auto Scaling stops instances, but always leaves at least one instance running.

Host Manager – It is a software component which runs on every EC2 instance that has been assigned to your application. The host manager is responsible for various things like

  • Generating and monitoring application log files
  • Generating instance level events
  • Monitoring application server

Security Groups – Security Group is like a firewall for your instance. Elastic Beanstalk has a default security group, which allows the client to access the application using HTTP Port 80. It also provides you with an option where you can define security groups to the database server as well. The below image summarises what we have learned about Web Server Environment.

Architecture - AWS Elastic Beanstalk - Edureka

So that’s all about Web Server Environment. But what if the application version installed on Web Server Tier keeps denying multiple requests because it has encountered time intensive and resource consuming tasks while handling a request? Well, this is where Worker Tier comes into the picture.

No comments:

Post a Comment