Chapter 12. Decoupling your infrastructure: ELB and SQS

 

This chapter covers

  • The reasons for decoupling a system
  • Synchronous decoupling with load balancers
  • Asynchronous decoupling with message queues

Imagine that you want some advice on using AWS from us, and therefore we plan to meet in a café. To make this meeting successful, we must

  • Be available at the same time
  • Be at the same place
  • Find each other at the café

The problem with our meeting is that it’s tightly coupled to a location. We can solve that issue by decoupling our meeting from the location, so we change plans and schedule a Google Hangout session. Now we must

  • Be available at the same time
  • Find each other in Google Hangout

Google Hangout (this also works with all other video/voice chats) does synchronous decoupling. It removes the need to be at the same place while still requiring us to meet at the same time.

We can even decouple from time by using an e-mail conversation. Now we must

  • Find each other via email

Email does asynchronous decoupling. You can send an email when the recipient is asleep, and they’ll respond when they’re awake.

12.1. Synchronous decoupling with load balancers

12.2. Asynchronous decoupling with message queues

12.3. Summary