<< ---------------------------------------------------------------- >>
Reverse Proxy
<< ---------------------------------------------------------------- >>
https://www.youtube.com/watch?v=-QcQd3Bkc9o
Could be a NGINX server in our Virtual Private Cloud(VPC), it takes in the request and then modifies it’s header or body and then sends it to one of the servers inside of the VPC.
Benefits
- SSL Encryption
- so all communications with the client and outside of the VPC have to be done through HTTPS, you can set up communications between servers using HTTP, but NGINX can also handle that part. Not sure why you would do it through NGINX rather than just normal HTTP, if they’re all on the same serve?
- you can have the ssl certificates and everything here and update them with a cron job if needed.
- Buffering
- used to prevent a Slowloris attack. when the internet speed of the client is slow and the response packet is very big, the response is going to be send in a lot of smaller chunks. NGINX can handle the buffering that is needed in this situation, not sure why its needed, need to look up this more todo
- Recovery
- if one of the servers inside of the VPC is down, u can define custom 404 pages and things to do if that happens
- Load Balancing
- NodeJS already has a cluster module for load balancing, but for enterprise backends, with a lot more requests, NGINX is a lot easier for some reason.
- Enterprise Routing
- like you can reserve a server for a specific API call and route all of that certain type of request to the designated server
- Gzip Compression
- just zipping css, JS and other files.
- Caching Static Content
- instead of having a whole ass caching thing with NodeJS you can just use NGINX to cache things.