This application is the product of a containerized Docker setup running Flask. It is deployed on an Amazon EC2 instance using Docker Compose, and served through an Nginx proxy. The setup leverages the AWS Ecosystem to provide a scalable and secure environment for the application.
This domain map is a visual representation of the architecture and components of the application. It includes the Flask application, Nginx server, Docker containers, and the database service. The diagram illustrates how these components interact with each other and the flow of data between them. The diagram also illustrates the network endpoints and routes between the containers, the EC2 Instance, Public Subnet, Internet Gateway, and the Public Internet. The diagram also shows the VPC, Subnets, and Security Groups that are used to secure the application and control access to the resources.
| Domain Map Components | |
|---|---|
| Component | Description |
| AWS Route 53 | A DNS web service that routes traffic to the EC2 instance based on the domain name. |
| AWS Internet Gateway | Allows the EC2 instance to communicate with the public internet. This is the entry point for all external connections to the web server. |
| Test VPC | A Virtual Private Cloud (VPC) that provides a secure and isolated network environment for the application. |
| Public Subnet | A subnet within the VPC that is accessible from the internet. The EC2 instance is deployed in this subnet. This application is setup in a single availability zone for cost savings, for more resilency, this could be setup in multiple availability zones. |
| AWS EC2 Instance | A virtual server in the cloud that hosts the Docker containers and runs the Flask application. For Scalable architectures, this could be setup in an Auto Scaling Group with a load balancer |
| Nginx Proxy | A web server that acts as a reverse proxy to route traffic to docker containers. it is setup to handle SSL termination and forward traffic to the appropriate container based on the request URL. This is a single point of failure, for more resilency, this could be setup in multiple availability zones. |
| Docker Containers | Lightweight, portable, and self-sufficient environments that run the application and its dependencies. Each container runs a specific service or component of the application. These containers are behind the Nginx proxy and are not directly accessible from the internet. |
| HTTP Load Balancer | A web server that acts as a reverse proxy to route traffic to the application containers. This is actually an Nginx container setup in a load balancing configuration. It handles incoming requests and forwards them to the appropriate Docker container. |
| Webapp Containers | Containers that run the Flask application and serve the web pages. there are two redundant containers running in a load balanced configuration. this allows for the update of one container while the other is still serving traffic, allowing for zero downtime updates. |
| Database Service | A Flask-based service that generates random data and stores it in an SQLite3 database. It exposes a REST API for the main app to fetch data. |
|
Note: The diagram is a simplified representation of the architecture and may not include all components. |
|