schizanon,
@schizanon@mas.to avatar

I get that is a "pull-based" message bus, while is "push-based", but given that I don't understand why SQS exists.

Push seems superior, so why involve a at all?

But fanning out SNS events to SQS is a recommended pattern, why?

What can you do with a poll-based queue that you couldn't do with a push-based ?

ak,
@ak@mastodon.social avatar

@schizanon If no one picks up the phone when you do a push, you have a problem (potentially)

schizanon,
@schizanon@mas.to avatar

@ak why not retry?

ak,
@ak@mastodon.social avatar

@schizanon then it would be sqs lol

schizanon,
@schizanon@mas.to avatar

@ak 😭

ak,
@ak@mastodon.social avatar

@schizanon meaning - the architecture is deliberately pretty simple on the event provider side, which keeps it low cost and minimal. There are use cases for fire and forget events. Anything more complex needs a queue or stream.

schizanon,
@schizanon@mas.to avatar

@ak I still think they should just merge the two tools; make SQS do push, or make SNS do retries. I don't even care if they still use each other internally, just don't expose it to end-users!

ak,
@ak@mastodon.social avatar

@schizanon In practice, there's little difference if you consume SQS via Lambdas since they pull automatically really fast. If you are doing your own consumers you probably want something like a pub/sub with some delivery guarantee (mqtt or something - aws has a hosted version called iot core)

atzanteol,
@atzanteol@techhub.social avatar

@schizanon

There are other differences. SQS persists messages if there is no consumer. SNS does not.

schizanon,
@schizanon@mas.to avatar

@atzanteol why can't SNS detect whether or not a consumer accepts and retry?

atzanteol,
@atzanteol@techhub.social avatar

@schizanon
They have different design goals that are opposed to each other. SNS is low-latency but low-reliability. SQS is highly reliable but with higher latency.

Ensuring message delivery adds overhead (you need to store the message to disk, then a consumer needs to fetch it, then the consumer needs to acknowledge receipt, then the message is removed). And since SQS persists messages it also has a dead-letter queue for re-processing messages that aren't handled successfully.

SQS can also ensure a FIFO where SNS cannot. So each message needs an ID to ensure they're delivered in order.

It mostly depends on what your use-case is. Do you want to send thousands of push-notifications and you don't care about a few failing? SNS would be fine. Do you want to share data between applications? Probably SQS.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • AWS
  • kavyap
  • thenastyranch
  • ethstaker
  • DreamBathrooms
  • osvaldo12
  • magazineikmin
  • tacticalgear
  • Youngstown
  • everett
  • mdbf
  • slotface
  • ngwrru68w68
  • rosin
  • Durango
  • JUstTest
  • InstantRegret
  • GTA5RPClips
  • tester
  • cubers
  • cisconetworking
  • normalnudes
  • khanakhh
  • modclub
  • anitta
  • Leos
  • megavids
  • provamag3
  • lostlight
  • All magazines