Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
68 views
in Information Technology by (178k points)
What is Amazon Simple Notification Service (SNS) and how does it differ from SQS?

Please log in or register to answer this question.

1 Answer

0 votes
by (178k points)

Amazon Simple Notification Service (SNS) and Amazon Simple Queue Service (SQS) are both messaging services provided by Amazon Web Services (AWS), but they serve different purposes and have distinct characteristics:

Amazon Simple Notification Service (SNS):

  1. Pub/Sub Messaging Service: SNS follows a publish-subscribe (pub/sub) messaging model, where publishers (senders) send messages to topics, and subscribers (receivers) subscribe to topics to receive messages.
  2. Fanout and Broadcast Messaging: SNS allows messages to be broadcast to multiple subscribers simultaneously or fan out to multiple endpoints or subscribers.
  3. Push-Based Delivery: SNS delivers messages to subscribers using push-based delivery mechanisms, such as HTTP/HTTPS, email, SMS text messages, mobile push notifications (iOS, Android, Amazon Device Messaging), and more.
  4. No Message Persistence: SNS does not persist messages. Once a message is published to a topic, it is delivered to all active subscriptions and then discarded.
  5. No Message Ordering: SNS does not guarantee message ordering or message deduplication. Messages can be delivered out of order, and duplicate messages may be delivered to subscribers.
  6. Event-Driven Architecture: SNS is often used in event-driven architectures to distribute notifications, trigger automated actions, or coordinate the delivery of messages between different components or services.

Amazon Simple Queue Service (SQS):

  1. Message Queuing Service: SQS is a distributed message queuing service that allows you to decouple the components of your application by sending, storing, and receiving messages between different software systems or components.
  2. Point-to-Point Messaging: SQS follows a point-to-point messaging model, where messages are sent to queues and retrieved by consumers (receivers) from the queues.
  3. Pull-Based Delivery: SQS delivers messages to consumers using pull-based delivery mechanisms. Consumers retrieve messages from queues using the ReceiveMessage API operation.
  4. Message Persistence: SQS persists messages in queues until they are explicitly deleted by consumers. Messages are stored redundantly across multiple availability zones for high availability and durability.
  5. Message Ordering and Deduplication: SQS FIFO (First-In-First-Out) queues guarantee that messages are delivered exactly once and in the order they are sent. FIFO queues provide message deduplication to prevent duplicate messages from being processed multiple times.
  6. Asynchronous Processing: SQS is often used for asynchronous processing, background tasks, task queuing, or job scheduling in distributed systems or microservices architectures.

In summary, SNS is a pub/sub messaging service used for broadcast messaging and event-driven architectures, while SQS is a message queuing service used for point-to-point messaging and asynchronous processing. SNS is push-based, while SQS is pull-based. Each service has its own strengths and use cases, and they can be used together in combination to build scalable and decoupled distributed systems on AWS.

Related questions

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...