I have a WordPress blog that serves niche content on domain.com
On a different endpoint, domain.com/api/
I have a completely different Node.JS API that doesn't regard the WordPress but I want to serve it from the same domain.
It is worth mentioning that we proiritize performance and speed above all.
My thought was the following :
Set up 2 EC2 Instances
, one for the WordPress and one for the API (Maybe make the API a Lambda
instance ?).
Set up an Application Load Balancer
that will know how to route requests with a rule depending on the URL.
Is it the right way to go ? Should I just use nginx
as a reverse proxy and serve the Node.JS API on a local port ?
I also want to use Elastic Beanstalk
to save myself the headache of configuring the Load Balancer and the Auto Scaling group.
P.S If anyone has any advice or good habits on how to build those (With S3 Bucket perhaps, over CloudFront, etc etc) it will be more than welcome.
Thanks !