22

For a sake of HA I'm considering switching from self hosted solution (ZeroMQ) to AWS Simple Notification Service for pub/sub in an application. Which is a backend for an app, thus should be reasonably real-time.

What are latency and throughput I can expect of SNS?

vartec
  • 131,205
  • 36
  • 218
  • 244
  • Just curious: Why are you choosing SNS over SQS? For HA, SQS can allow multiple subs to divide the requests. – PBelzile Feb 16 '13 at 02:19
  • 2
    @PBelzile: First, SQS has no true pub/sub model. The standard way for pub/sub in SQS is to use SNS + SQS endpoint. Second, I don't like SQS active polling. Third, from my experience I know, that SQS's latency is to high and unpredictable. – vartec Feb 17 '13 at 15:06
  • Here is some solid data on the matter, if you're using SQS as your SNS endpoints: https://softwaremill.com/amazon-sqs-performance-latency/ To sum up: running many nodes with many threads you can expect to get 95% of your messages within 1300ms, avg 700. On smaller scales you can expect around 200ms. – Avi Cherry May 14 '19 at 21:50

1 Answers1

8

Is the app going to be hosted on EC2? If so, the latency will be far diminished, as the communication channel will be going across Amazon's connection, rather than through the internet.

If you are going to call AWS services from boxes not hosted on EC2, here's a cool site that attempts to give you an idea of the amount of latency between you and various AWS services and locations.

enter image description here

How are you measuring the HTTP Ping Request Latency?

We are making a HTTP GET request to AWS Service Endpoints (like EC2, SQS, SNS etc) for PING and measuring the observed latency for it across all regions.

As for thoughput, that is left up to you. You can use various strategies to increase throughput, like multi-treading, batching messages, etc.

Keep in mind that you will have to code for some side effects, like possibly seeing the same message twice (At Least Once Delivery), and not being able to rely on FIFO.

GalacticJello
  • 11,235
  • 2
  • 25
  • 35
  • 7
    Quite cool site, however I don't see how HTTP ping form my location to SNS endpoint translates into service's delay. – vartec Feb 15 '13 at 16:39
  • 1
    yeah this doesn't look like the appropriate answer. This is a latency from browser to the service in various regions, but does not measure whether the service is `real-time` or not. – Mobigital May 09 '17 at 23:17
  • That site no longer exists. – Petrus Theron Jul 31 '23 at 10:54