I want to develop my application separately (API, JOBS, WEB), so that it stays in this manner:
- API: api.myaddress.com
- JOBS: jobs.myaddress.com
- WEB: myaddress.com
I know how to do that with distinct instances with Amazon and GoogleComputing, however, I was wondering IF, I could setup a single instance to do all that, and each DNS namespace, going to a different port on that machine, like:
- api.myaddress.com resides in xxx.xxx.xxx.xxx:8090
- jobs.myaddress.com resides in xxx.xxx.xxx.xxx:8080
- myaddress.com resides in xxx.xxx.xxx.xxx:80
Also if that is possible, I don't know where I should configure that (Is it in the DNS, or a specific setup on my instance in Amazon/Google?)
what you are looking for is a load balancer (ELB in case of amazon).
setup the load balancer to send traffic to the different ports and at DNS level setup CNAMES for your services that point to the 3 load balancers that you have.