I want to have grafana in a docker container within ec2. This will recieve traffic from Influxdb, also hosted in docker container, seperate ec2. I want to know if these should be hosted in a private or public subnet within my VPC. If i am needing to access the UI, I will need internet access (via Load Balancer to gateway in private subnet OR open port in public subnet to the local network via security goup). I don't understand how putting it in the private subnet is more secure when using a load balancer to internet gateway/nat gateway than just hosting and securing the open inbound ports in public subnet.
I have tried both instances, but I am just confused about which is more secure/cost effective/effienct. I also want to increase availability, so I will add ebs/mult avail zones.