aeon
aeon

Reputation: 1069

What are the Possible Serverless System Architectures for Web Application (AWS) for Cost Cutting

* APOLOGIES for the IMAGES Posted *

I am looking for potential cost cutting measures for an application that is hosted on AWS with the following configuration / setup.

The application is used 95% of the time for 1 week in a month, and the remaining time 5% distributed over the remaining 3 weeks.

For the sake of cost cutting so as to not pay for the EC2 instances, we are looking to go serverless.

My Background w.r.t. Cloud / AWS:

I have prepared a presentation based on the materials I have read online. But I need expert opinion / confirmation that the solution options in the presentation are

  1. Possible to Implement
  2. Not Too Complex to implement compared to the EC2 Implementation
  3. Potentially saves money as a generic case, compared to renting EC2 instances

The presentations slides are as below:


enter image description here


enter image description here


enter image description here


enter image description here


enter image description here


enter image description here


enter image description here


I am not limiting to AWS, but since current application is hosted on AWS would like to use the same platform. But if similar implementations are possible using Azure or other platforms, we are open.

All that we are looking for is to cut costs.

I may be missing to provide some important information for you to help advice me. Please let me know what you need and I will get it for you.

Thanks.

Regards

Upvotes: 2

Views: 323

Answers (1)

Matt D
Matt D

Reputation: 3496

Here is my thoughts on this broad question, my answer is AWS orientated, but all cloud vendors offer similar services:

You can absolutely save big money going from Monolith to Serverless, in most scenarios.

  • You do not pay for idle compute time, only pay for the milliseconds that your system is doing something of value.
  • Your service can scale to millions of requests an hour without prior warning.
  • No need to maintain servers, load balancers, or databases instances.

Moving to serverless does mean rearchitecting your application to be event driven. This can be quite a challenging paradigm shift, but one that you will not look back from. You may choose to start with a complete rewrite, or use the strangler pattern to move more gradually.

I suggest the following AWS Services to most serverless systems:

  • S3 Static Websites, to host a Single Page Application (Angular, React, Vue)
  • API Gateway, sits there waiting for an incoming HTTPS request from the web app or API. Also use custom authorizers to control access.
  • Lambda, for responding to events (from API Gateway, S3 file uploads, data changes)
  • DynamoDB, for structured data storage (S3 for binary artefacts).
  • Step Functions, for orchestrating more complex Lambda event chains.

Depending on your specific use-case you may also make use SNS, SES, Kinesis, and more.

The Serverless Framework is great for coordinating all of these services in an Infrastructure-as-Code style approach. Greatly simplifying the deployment of all the dependencies. They also have many examples of common architecture examples to start from.

Serverless functions scale really smoothly... however, be mindful of stressing services that don't, such as Relational Databases or third-party APIs.

Scenarios where you won't save money are, if you have consistent load 24/7 (high utilised EC2) or you run long processing batch jobs (scaling EC2 on SQS is more suitable).

Upvotes: 1

Related Questions