5 ms·
Has anyone ever measured the latency of the sending message to SQS? I was using with ELB in t2.medium instances, and my API (handle => send message to queue =>
by yilugurlu 7y ago
Has anyone ever measured the latency of the sending message to SQS? I was using with ELB in t2.medium instances, and my API (handle => send message to queue => return {status: true}) response times were around 150 - 300 ms and replaced SQS with RabbitMQ, and it went down to around 75-100 ms.
Does anyone think that sending message to SQS is slow?
Edit:
With this update, I was able to process almost 3 x requests with the same resources, and it lowered my bills quite a lot.
For example my SQS bill for last month
Amazon Simple Queue Service EUC1-Requests-Tier1
$0.40 per 1,000,000 Amazon SQS Requests per month thereafter 290,659,096 Requests $116.26
it went to 0, and ec2 cost went down as well because ELB spun up fewer instances that I could handle more quest with the same resources.
This was my experience with SQS. I just wanted to share it.
- avh02 7y agoBenchmarks online show this to be true, depends on your use case if it's acceptable I guess.
- Feeble 7y agoWere you running RabbitMQ clustered with persistent queues? I don't think SQS is primarily for low-latency messaging, but rather a provided high available MQ with very little hassle.
- yilugurlu 7y agoI wasn't, single instance in the same subnet with persistent work queues.
- KirinDave 7y agoIn cases where latency is of primary concern, don't use SQS. Consider also not using Rabbit as its tail latency isn't hugely more reliable when loaded.
- actuator 7y agoUmm.. is this in the same DC? From what I remember from numbers from New Relic. - The average SQS Put latency is: 10-20 ms. - RabbitMQ Publish Message in the same DC should not be more than the round trip time of a DC assuming a persistent connection. So, about 0.5 ms
- avip 7y agoSounds more like AZ issue than SQS/rabbit?
- kondro 7y agoI’m not quite sure why latency affected total throughout. Although 100-300ms seems pretty good for total round-trip latency to most message queues. Another thing to make sure of is that whatever HTTP client you’re using to interact with AWS is using pipelining. It’s off by default for the JS libraries for example.