What is a VPC
Last updated
Last updated
VPC = Virtual Privat Cloud
This is an instance that can be deployed to a region over multiple availability zones
It kind of acts like a private network that contains multiple subnets
The great thing about it is that it is private and secure
The resources can communicate between subnets but they do not communicate outside of the subnet
To be able to serve the app to the internet (let's say it's a webapp) we can add the private subnets 10.0.1.0/24
and 10.0.4.0/24
to a internet gateway
The now public subnets with the load balancer resources are reachable from the internet but they are still able to communicate with the other subnets in the VPC
Create subnet that is connected to a Internet gateway and has something like Nginx deployed to it
Create another subnet where you would add the webapps
Create another subnet where you would add the databases
Note that all the deployed resources communicate with each other
Our internet gateway allows HTTPS connections on port 443 to server 10.0.1.10
which hosts Nginx
Nginx Server --> Forward traffic to webapp --> webapp connects to database, also processes the request and returns data to Nginx --> Nginx servers the result to the end user