When two services needed to communicate with one another in the past, one service would make an api call to notify the other service that something had changed or taken some action.
With Amazon Simple Queue Service(SQS), the event or notification-producing service can asynchronously notify the consumer that something has changed in its system, allowing for a very clean decoupling of these two services.
Types Of SQS
There are two types of SQS:
- Standard Queue
- FIFO Queue
Standard Queue has an unlimited throughput. What this means is that there's an infinite processing rate.
You can perform nearly an unlimited number of transactions per second.
A message is delivered at least once, but occasionally more than one copy of a message is delivered.
Occasionally more than one copy of a message is delivered.
They might also be delivered in an order different from which they were sent.
First and foremost, FIFO Queue stands for first in, first out. It operates in the same manner as its name. What comes in first is processed first.
Processing In Exact Order
Messages are sent and received in strict chronological order.
Messages are also delivered in sequence, so there is no possibility of out-of-order processing.
There is a tps (transactions per second) limit, so there is no unlimited throughput. You do have a capt with a maximum value of 300 tps.
However, if you use batching, you can publish to SQS with up to 10 messages in a batch and only use one api operation.
As a result, you can publish 3000 tps instead of 300 if you use ten messages per batch.
The key advantage of Amazon SQS is that it allows for asynchronous message-based communication, which makes it better than API calls.
SQS was one of the initial services offered by Amazon Web Services. It was first released as a beta in 2004 and then as a complete release in 2006.
Top comments (0)