Getting Started
NServiceBus
Transports
Persistence
ServiceInsight
ServicePulse
ServiceControl
Monitoring
Samples

Web-queue-worker architecture style on Azure

The Azure Architecture Center describes the web-queue-worker architecture style as having core components that are a web front end that serves client requests, and a worker that performs resource-intensive tasks, long-running workflows, or batch jobs, with the web front end communicating with the worker through a message queue.

Overview of Azure web-queue-worker style

Components

  • The web front end serves client requests, handles authentication and authorization.
  • The front end queues commands for intensive or long-running workloads in the message queue for the worker to consume. This allows the web application to remain independent of the worker's workload and to immediately respond to HTTP requests.
  • The worker receives work from the message queue. Results can be stored in the data store.
  • Both worker and front end might access the data store directly to access business data and process state. An optional cache might be used for performance optimizations.
  • A Content Delivery Network can help to serve static content even faster and reduce load on the web front end.

Challenges

This style is suitable for simple business domains. Without careful design, the front end and the worker can become complex, monolithic components that are difficult to maintain. Consider event-driven and microservices architectural styles for more complex business domains.

Technology choices

The web-queue-worker architecture style can make use of Azure's managed services like Azure App Services, Azure Static Web Apps, Azure Functions, and Cosmos DB. Azure Storage Queues is a good messaging queuing solution for sending small messages. Azure Service Bus is a powerful alternative which caters to larger messages and provides other advanced features.

Additional resources

Do you have questions?

Ask our solution architects

Join Udi Dahan's in-depth Advanced Distributed Systems Design course

Learn more about the course