Using queues

SQS gives you tremendous power to decouple your architecture. However, resilience is only one part of the story. You can use queues to manage transaction costs. For example, in an application that uses the freemium business model, SQS can trigger auto scaling groups based on your customer types, free or paying. In order to pay customers, you can scale the fleet when there are more than a certain number of requests in the queue or the age of the requests exceed a certain threshold (based on SLAs).

Instead of using queues, you can simplify your architecture further using AWS Lambda service based on S3 event triggers. You can use two buckets—one for incoming input that uses an S3 event to trigger Lambda function for processing and then store the output to another bucket. The main advantages of using Lambda in this scenario include elimination of your response time-based SLAs and getting to enjoy the cost benefits of the free tier available for it, forever. In addition, you can optimize your costs further by using spot instances for your free customers while the Lambda service is used to process requests from your paying customers.

In the next section, we briefly discuss the various environments you should provision for effective cloud-based application development.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.146.199