Search This Blog

Wednesday, November 14, 2018

Asynchronous Messaging Patterns and High Availability

Asynchronous messaging can be implemented in a variety of different ways. With queues, topics and subscriptions, collectively called messaging entities, In synchronous operation, you send messages to queues and topics, and receive messages from queues and subscriptions. Applications you write depend on these entities always being available. When the entity health changes, due to a variety of circumstances, you need a way to provide a reduced capability entity that can satisfy most needs.

Applications typically use asynchronous messaging patterns to enable a number of communication scenarios. You can build applications in which clients can send messages to services, even when the service is not running. For applications that experience bursts of communications, a queue can help level the load by providing a place to buffer communications. Finally, you can get a simple but effective load balancer to distribute messages across multiple machines. In order to maintain availability of any of these entities, consider a number of different ways in which these entities can appear unavailable for a durable messaging system.

Generally speaking, we see the entity become unavailable to applications we write in the following different ways:

  • Unable to send messages. 
  • Unable to receive messages. 
  • Unable to administer entities (create, retrieve, update, or delete entities). 
  • Unable to contact the service. 

For each of these failures, different failure modes exist that enable an application to continue to perform work at some level of reduced capability.