Serverless public facing website hosted on AWS Fargate
About
A public facing web service is one of the most common architecture patterns for deploying containers on AWS. It is well suited for:
- A static HTML website, perhaps hosted by NGINX or Apache
- A dynamically generated web app, perhaps served by a Node.js process
- An API service intended for the public to access
- An edge service which needs to make outbound connections to other services on the internet
With this pattern you will deploy a serverless container through Amazon ECS, which is hosted on AWS Fargate capacity.
A containerized website, hosted as a public facing service, managed by ECS, hosted on serverless AWS Fargate capacity
Public facing API hosted on EC2 instances
About
This pattern demonstrates how to host an API service, or other critical internal service which lives in a private portion of your VPC network, yet can still receive traffic from the public internet. The service containers will not have a public IP address, and they will be protected by a custom security group for the service. However, you can still expose them to the public via a load balancer ingress in the public portion of your VPC network.
A containerized public facing API in a private network, managed by EC2, hosted on EC2 capacity.
Public facing website hosted on EC2 instances
About
This is a simple public facing web service, hosted on EC2 instances, and fronted by an Application Load Balancer that provides ingress from the internet. This pattern is well suited for:
A containerized website, hosted as a public facing service, managed by EC2, hosted on EC2 capacity.
Low cost AWS VPC for an Amazon ECS cluster
About
Amazon Virtual Private Cloud (Amazon VPC) gives you full control over your virtual networking environment, including resource placement, connectivity, and security.
The ideal way to configure a VPC is to use both public and private subnets. The public subnets are used for hosting internet facing resources like load balancers, while the private subnets are used to host application containers and other private resources.
Deploy a low cost VPC, with public subnets only.
Step scaling policy for ECS service based on CPU consumption
About
Auto scaling is very important for ensuring that your services can stay online when traffic increases unexpectedly. In both EC2 and AWS Fargate you can configure Amazon ECS to automatically increase and decrease the number of copies of your application container that are running in the cluster.
CloudFormation for automatically scaling an ECS service up and down based on CPU usage
Use target tracking to scale container deployments with Amazon ECS
About
AWS Application Auto Scaling implements automated scaling policies and rules across many AWS services, including Amazon ECS.
Target tracking is a scaling mode in which Application Auto Scaling automatically learns how to adjust your scale to meet your expectation that a target metric will stay at a specified target. Target tracking works best with larger services, where there is a linear relationship between scaling and metrics.