AWS Serverless and Microservices — Part 5

  1. Notification service can be leveraged by different applications running in the Organization and hence there should be an option to control the Rate limit should there be a need
  2. Service endpoint should be secured
  3. Service should be scalable
  4. Should be open for extension
Notification Processing Flow
  1. Leveraged AWS API Gateway to have support for Rate Limiting.
  2. Token based Lambda Authorizer for ensuring that only authenticated requests are allowed. End clients shall be issued unique Application ID and Secret which needs to be passed in the Authorization Header when making API Gateway request to send notification.
  3. Leveraged AWS SQS Message Broker with Storage First Pattern. This ensures that System can accept notification messages for delivery without throttling the end client requests and can then process the messages based on the scalability supported by the downstream applications. And yes, there will be SLAs around delivery of notifications in real time, and it would require additional thought process 😏. I have not considered the same for simplicity purpose.
  4. Instead of Lambda handlers directly saving processed message data to DynamoDB, SQS is being introduced to buffer the data and then save it in DynamoDB as per Write Capacity Unit (WCU) configured for it.
  5. System is highly extensible. Should there be a need to add additional delivery channel, let’s say Mobile Push Notification, a new SQS and Lambda Handler can be added without impacting the existing system.
  1. Using AWS Simple Notification Service (SNS) service for making HTTP calls to the Callback URL configured for the specific client application. With this option, client has to ensure that HTTP endpoint is always available else there are chances of message status getting lost. The callback URL can be subscribed in the SNS Topic.
  2. Lambda handler to deliver status of the processed messages to the calling application’s AWS Event Bridge service. In this approach, Notification service is responsible to delivering the message status to the Client’s AWS Event Bridge and then client application can configure Lambda handlers or other consumer processes to process the event.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Naresh Waswani

Naresh Waswani

#AWS #CloudArchitect #CloudMigration #Microservices #Mobility #IoT