Thursday, June 25, 2020

Quick Reference – Azure Design Patterns – Messaging patterns

The distributed nature of cloud applications requires a messaging infrastructure that connects the components and services, ideally in a loosely coupled manner in order to maximize scalability. Asynchronous messaging is widely used and provides many benefits, but also brings challenges such as the ordering of messages, poison message management, idempotency, and more.

Competing Consumers pattern

Enable multiple concurrent consumers to process messages received on the same messaging channel. This enables a system to process multiple messages concurrently to optimize throughput, to improve scalability and availability, and to balance the workload.

Using a message queue to distribute work to instances of a service
Competing Consumers Design Pattern Illustration

Pipes and Filters pattern

Decompose a task that performs complex processing into a series of separate elements that can be reused. This can improve performance, scalability, and reusability by allowing task elements that perform the processing to be deployed and scaled independently.

Figure 2 - A solution implemented using pipes and filters
Pipes and Filters Design Pattern Illustration

Priority Queue pattern

Prioritize requests sent to services so that requests with a higher priority are received and processed more quickly than those with a lower priority. This pattern is useful in applications that offer different service level guarantees to individual clients.

Figure 1 - Using a queuing mechanism that supports message prioritization
Priority Queue Pattern Illustration

Queue-Based Load Leveling pattern

Use a queue that acts as a buffer between a task and a service it invokes in order to smooth intermittent heavy loads that can cause the service to fail or the task to time out. This can help to minimize the impact of peaks in demand on availability and responsiveness for both the task and the service.

Figure 1 - Using a queue to level the load on a service
Queue Based Load Leveling Pattern Illustration

Scheduler Agent Supervisor pattern

Coordinate a set of distributed actions as a single operation. If any of the actions fail, try to handle the failures transparently, or else undo the work that was performed, so the entire operation succeeds or fails as a whole. 

Figure 1 - The actors in the Scheduler Agent Supervisor pattern
Scheduler Agent Supervisor Pattern Illustration

References

  • https://docs.microsoft.com/en-us/azure/architecture/patterns/competing-consumers
  • https://docs.microsoft.com/en-us/azure/architecture/patterns/pipes-and-filters
  • https://docs.microsoft.com/en-us/azure/architecture/patterns/priority-queue
  • https://docs.microsoft.com/en-us/azure/architecture/patterns/queue-based-load-leveling
  • https://docs.microsoft.com/en-us/azure/architecture

No comments:

Post a Comment

Free hosting web sites and features -2024

  Interesting  summary about hosting and their offers. I still host my web site https://talash.azurewebsites.net with zero cost on Azure as ...