Making Sure Events Don't Drop In The AWS Cloud
Event-driven architectures can be really powerful.
A critical aspect of these designs is properly handling the events that drive the solution. You want to make sure that your design gracefully handles events that can’t be processed when they are emitted.
There are a few patterns to do this. This Twitter thread ๐ looks at two methods to address this challenge using Amazon EventBridge.
there are two general paths to take here:
- make sure unhandled events can be replayed
- make sure that unhandled events can be resent
๐งต #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 2/11 ๐ Next tweet ๐ Start
- there are use cases where resending unhandled events is the better path, it entirely depends on what the event is describing
let’s look at a two ways to implement this @awscloud…
๐งต #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 3/11 ๐ Next tweet ๐ Start
the docs are up at https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-dlq.html
๐งต #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 4/11 ๐ Next tweet ๐ Start
you don’t have to worry about that but it’s handy to know, because it does open up some possibilities
EventBridge DLQ can be used when EventBridge can’t fire a trigger for an event
๐งต #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 5/11 ๐ Next tweet ๐ Start
when that happens, EventBridge can drop the event to a DLQ
- you can send them to the DLQ directly on 1st fail too
๐งต #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 6/11 ๐ Next tweet ๐ Start
…use Lambda
more at https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-dlq.html#eb-dlq-resend
๐งต #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 7/11 ๐ Next tweet ๐ Start
the 2nd pattern is to use EventBridge’s archive feature…yes, it has an archive feature
the docs are up at https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-archive.html
๐งต #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 8/11 ๐ Next tweet ๐ Start
once events are in the archive, you can use the replay feature to…um…replay them
docs at https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-replay-archived-event.html
๐งต #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 9/11 ๐ Next tweet ๐ Start
…but the archive is really interesting. the replay feature is good for series of events over a set timeframe. for some use cases, this is the way to go
๐งต #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 10/11 ๐ Next tweet ๐ Start
making sure that your design can deal with those unhandled events effectively is critical to a reslient design
๐งต #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 11/11 ๐ Next tweet ๐ Start
honestly, I had no idea that the archive feature existed in EventBridge. glad i stumbled across it today!
/๐งต #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40