While planning to take your new or existing web application to the AWS cloud, sooner or later you will be faced with the decision on the type of server you will make use of. Although this decision is not irreversible, it will remain by your side for a longer while. Your chosen architecture will affect how you build, deploy and maintain your solution as well as the potential scale-out options you will have. It is therefore crucial to understand the available options and their pros and cons. In this blog, I will try to address the most popular services and how they differ from each other. If at any point you find yourself confused or in disagreement with the content, let me know in the comments!
First things first, what is a web server?
In order to build an application and make it consumable by clients (internet browsers, other web applications, mobile applications) you need a server to handle HTTP requests and responses. This server can, of course be located on premise or in the cloud but seeing that our focus is on Amazon Web Services, let’s limit this writeup to cloud only. Servers provide the required hardware capacity to process users’ requests, they are the backbone of calculations, database access, interaction with APIs and other processing which is not fit for the client side. Knowing the planned functionality of the app is a must if you want to make an informed decision on the type of server to use.
Selection criteria for AWS Compute Services
Amazon Web Services offers a high range of compute services available for your web application requirements. Before you start thinking about a specific offering, you need to evaluate your needs and decide which category of compute services would best suit them. Your decision should consider factors like:
- Flexibility – some categories give you full freedom to change and customise the service and other come almost
- Maintainability – do you want to be responsible for patching, updating and upgrading your compute platform or do you want AWS to take care of it for you?
- Scalability – do you want to be responsible for scaling of your service or do you want to automate it?
- Cost – can you afford paying for hardware you don’t use? Or would you rather switch to a consumption-based pricing model?
- Of course every application is different so you might also need to consider factors like time to market, refactoring effort (for existing apps) and vendor lock-in.
What Compute Services does AWS offer?
For the sake of readability, we decided to split this blog post into individual service offerings. Therefore, I now recommend that you go through the below posts before you proceed to the summary section! Good luck 🙂
So, which AWS Compute is the best for my use case?
First of all, let’s take a look at the grades we have assigned to each one of the discussed solutions;
|ECS & EKS||5||5||5||4|
|Lambda & Fargate||5||5||5||5|
So, which one should you choose? Well, the answer is… It depends on your use case, what else were you expecting? 🙂
Now on a more serious note, all of these services are built for the cloud and cloud is supposed to offer great flexibility. They all have something in common but also they are all flexible in their own way. Maintainability – the general rule is, the less that’s on your mind, the easier it is to maintain. EC2 takes the burden of hardware off your shoulders but leaves you with the OS to take care of, hence the lower rating. Scalability is also key, when moving to the cloud and AWS assures that. EC2 lost a point due to its complex vertical scalability approach. Our cost grading follows a simple rule – the less we pay, the better it is (wow, what a philosophical statement…) and serverless is the most cost-effective of them all.
AWS Compute service for a mobile app backend
Assuming that you are building an app for your startup, cost-effectiveness, quick time-to-market and good potential scalability options are among the 3 of your most important criteria. In this case, we would suggest that you investigate Amazon ECS/EKS based on Fargate. The reason for this is that it balances cost-effectiveness with good maintainability and scalability which are extremely important when shipping many new releases.
AWS Compute service for handling contact forms
If you are looking for a compute service to handle contact forms, we recommended that you use AWS Lambda as the most cost-effective option which does not require any reserved hardware and is only spun up when a request comes in through the API Gateway.
AWS Compute service for a web application
If you are building a web application for your company, it is very likely that you can already estimate the amount of traffic that the application will need to withstand as well as the peak and trough load times. Therefore, we suggest to use an AWS EC2 instance with the right scaling configuration.
CTA: Are you looking for a partner to help you plan out your next AWS-based software development project? Reach out to us!