Here's a clear comparison of Web Server Tier vs. Worker
Tier in AWS Elastic Beanstalk — two
different environment types twtech can use based on the nature of the application:
Web Server Tier
Purpose
Designed to run web applications
that handle HTTP requests directly from clients (browsers, APIs, etc.).
How It Works
- Accepts incoming HTTP(S) traffic through Elastic
Load Balancer (ELB).
- Runs on EC2 instances behind the ELB.
- Ideal for websites, REST APIs, frontend-backend apps.
Key Features
Feature |
Description |
Load Balancing |
Built-in with ELB |
Auto Scaling |
Automatically adjusts instance
count based on load |
Routing |
Receives traffic on standard ports
(80, 443) |
Health Checks |
Monitored via HTTP endpoint |
Supports HTTPS |
Terminate SSL at the load balancer |
Use Cases
- Web portals
- RESTful APIs
- Web dashboards
- eCommerce sites
- Real-time web apps
Worker Tier
Purpose
Designed to run background tasks
or asynchronous jobs triggered by messages from Amazon SQS (Simple Queue
Service).
How It Works
- Listens to an SQS queue.
- Picks up messages and processes them independently.
- Useful for offloading non-blocking, time-consuming
operations.
Key Features
Feature |
Description |
Queue Integration |
Automatically polls a specified
SQS queue |
No ELB |
Doesn’t receive HTTP requests from
browsers |
Concurrency |
Runs multiple jobs in parallel
(based on instance size and scaling config) |
Asynchronous |
Handles background/long-running
jobs |
Decoupled |
Logic is separate from the
user-facing app |
Use Cases
- Image/video processing
- Email sending
- Report generation
- Data transformation/ETL jobs
- Event-driven backend processes
Key Differences Summary
Feature |
Web Server Tier |
Worker Tier |
Traffic Type |
HTTP/S |
SQS Messages |
Entry Point |
ELB (Public) |
SQS Queue |
User Interaction |
Yes |
No |
Primary Use |
Serving web/API requests |
Background processing |
Load Balancer |
Yes |
No |
Scaling |
Based on HTTP traffic |
Based on queue length/CPU |
Example |
A React frontend with Flask API |
A job that sends batch emails from
a queue |
No comments:
Post a Comment