With Amazon SQS, you possibly can ship and obtain messages between software program parts at any scale. It was one of many first AWS providers I used and as a Solutions Architect, I helped many shoppers benefit from asynchronous communications utilizing message queues. In truth, Amazon SQS has been generally out there since July 2006 and, below the hood, has all the time used the identical wire protocol primarily based on XML that we name AWS Query protocol.
Today, I’m completely happy to announce that Amazon SQS now helps a JSON-based wire protocol for all APIs. The AWS JSON protocol avoids lots of the shortcomings of AWS Query protocol.
AWS JSON is extra environment friendly than the earlier XML-based protocol and may scale back each latency and client-side CPU utilization when sending and receiving SQS messages. For instance, for a request that sends a easy “hello world” message, the response physique measurement utilizing the outdated AWS Query protocol is about 400 bytes. The content material size of the identical SendMessage response utilizing the brand new AWS JSON protocol is lower than 1/3 of the earlier measurement.
Using the New JSON-Based Protocol with Amazon SQS
This is the nicest a part of this launch! To profit from the AWS JSON protocol, you simply have to replace the AWS SDK to the most recent model. While constructing this new functionality, the SQS staff was cautious in order that no code modifications are wanted to make use of the brand new JSON-based wire protocol.
For instance, we ran a benchmark utilizing the AWS SDK for Java to check the outdated and new wire protocols. We count on comparable outcomes from the opposite AWS SDKs. Based on AWS efficiency assessments for a 5KB message payload, JSON protocol for Amazon SQS reduces end-to-end message processing latency by as much as 23 p.c and reduces utility consumer facet CPU and reminiscence utilization. These numbers rely upon the precise implementation and may differ from what you’ll see to your personal purposes.
Availability and Pricing
Amazon SQS help for the brand new JSON protocol is accessible as we speak in all AWS Regions the place SQS is obtainable. All usually out there AWS SDKs now help AWS JSON for SQS APIs. To get the advantages of this optimization, you simply have to replace the AWS SDK to the most recent model out there.
There isn’t any change in pricing when utilizing the AWS JSON protocol. For extra data, see Amazon SQS pricing.
If you’re keen on extra particulars on how AWS protocols work, you possibly can take a look at Smithy, the language we use at AWS for outlining providers and SDKs.
After virtually 17 years of being usually out there, we’re bettering and innovating round our oldest service. Just a couple of months again, we launched server-side encryption with Amazon SQS-managed encryption keys (SSE-SQS) by default for newly created queues, elevated the default quota for top throughput mode for FIFO queues, and introduced help for attribute-based entry management (ABAC) utilizing queue tags. More lately, Amazon SQS added new APIs to handle dead-letter queue (DLQ) redrive programmatically. At AWS, it’s all the time day 1!
— Danilo