What is the difference between worker and web tier in AWS beanstalk

Looking through the documentation, I found out about these two environment layers in AWS, but couldn't find any comparison between them. The documentation suggests the following: For long-term tasks, choose a production environment (to improve the responsiveness of the web tier).

I have a few questions to clarify my doubts:

  1. How are the two levels different from each other? (in relation to the performance of various operations, services available in each, etc.)

  2. How do both communicate with each other? (if I developed my web tier front-end app and Work-tier)

+6


source to share


1 answer


The most important difference, in my opinion, is that runtime instances do not start web server processes (apache, nginx, etc.). As such, they do not directly respond to customer inquiries. Instead, they can be used to offload long running processes from your web tier.

The levels communicate with each other through SQS. When your web instance needs to create a background job, it posts a message to the public queue with the job details. A daemon running on a production instance reads an item from the queue and sends a message to the endpoint that your application provides http: // localhost / .



That being said, I think the web / worker architecture might be overkill in the "front-end / back-end" terms that you describe. Your web tier fully supports both web server and application server. If you have requirements for background or asynchronous processing, adding a worker layer might make sense.

+7


source







All Articles