Traditionally, IT infrastructure has been built on the premise of tightly interconnected servers, each serving a specific purpose. This usually means that when one component goes down the rest of the infrastructure can be fatally impacted. This architecture is often referred to as tightly coupled.
On the other hand, a loosely coupled architecture means reducing interdependencies between infrastructure components. That is, change or failure of one component does not affect other components.
AWS offers the messaging services Amazon SQS and Amazon SNS to deal with the challenge of building loosely coupled architectures.
Amazon SQS (Simple Queue Service)
- Fully-managed service that requires minimal configuration.
- Works on a massive scale.
- Stores messages until they are processed and deleted.
- Messages can be sent and read simultaneously.
- Messages are protected by Server-side encryption (SSE) using keys managed in the AWS Key Management Service (AWS KMS).
- Standard SQS queues offer at-least-once delivery and best-effort ordering.
- FIFO SQS (first-in, first-out) queues guarantee that messages are delivered exactly once, in the exact order that they are sent.
Amazon SNS (Simple Notification Service)
- SNS follows the ‘publish-subscribe’ messaging method that uses a push mechanism.
- You create topics and control access to the topic by defining publishers and subscribers.
- Subscribers are matched to topics and SNS delivers messages to each of the subscribers.
- Amazon SNS supports encrypted topics.
References: Amazon SQS