# ECS Websites and Load Balancers

**URL:** <https://awshq.com/t/ecs-websites-and-load-balancers/13601>\
**Category:** Databases\
**Tags:** rds, ecs, efs, load-balancer\
**Created:** [September 19, 2021, 9:38pm UTC](https://awshq.com/t/ecs-websites-and-load-balancers/13601 "2021-09-19T21:38:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Appelmoesje](https://awshq.com/letter_avatar_proxy/v4/letter/a/f04885/32.png) [@Appelmoesje](https://awshq.com/u/Appelmoesje)\
**Post date:** [September 19, 2021, 9:38pm UTC](https://awshq.com/t/ecs-websites-and-load-balancers/13601/1 "2021-09-19T21:38:26Z")

</div>

I’m working on a project that uses ECS, EFS and RDS to deploy multiple different Wordpress websites. Trying to use Load Balancers to get a static ip/dns so I can add different domain names for each website (ECS Service). I think I should use Load Balancers because otherwise when an ECS Service/Task goes down I need to reattach the domain when it goes back up again.

So with the Application Load Balancers I got everything to work out. Except the Target Group kept giving 50% Healthy and 50% Unhealty marks. I think this happened because the Application Load Balancer worked in 2 different Availability Zones. For costs reasons I just want to run everything in one Availability Zone. Application Load Balancers must work in two or more Availability Zones, so this Load Balancer will not work for my system.

Next is the Network Load Balancer. Online are not that many resources about them as there are for Application Load Balancer. I tried some different configurations but never got any 2XX responses when I try to go to the DNS of the Network Load Balancer. I can’t attach Security Groups to this Load Balancer and this may be the problem? Or it could be something else I don’t really know..

I would like some advice on what kind of Load Balancer and settings I could use for my system. Also, any other advice is appreciated as well!

---

<div class="post-metadata">

**Author:** ![ElectricSpice](https://awshq.com/letter_avatar_proxy/v4/letter/e/bb73d2/32.png) [@ElectricSpice](https://awshq.com/u/ElectricSpice)\
**Post date:** [September 19, 2021, 10:21pm UTC](https://awshq.com/t/ecs-websites-and-load-balancers/13601/2 "2021-09-19T22:21:40Z")

</div>

You can run ALB in two AZs while running your app in just one. Cross-AZ ALB traffic is free, so there won’t be additional cost for this.

---

<div class="post-metadata">

**Author:** ![vomitfreesince83](https://awshq.com/letter_avatar_proxy/v4/letter/v/5daacb/32.png) [@vomitfreesince83](https://awshq.com/u/vomitfreesince83)\
**Post date:** [September 20, 2021, 12:37am UTC](https://awshq.com/t/ecs-websites-and-load-balancers/13601/3 "2021-09-20T00:37:34Z")

</div>

Unless you’re running NAT gateways, ALBs won’t cost more money in multiple AZs. Stick with the ALB since you can do dynamic port mapping to your container. That means you can run multiple instances of your containers without having to use static ports on the host

---

<div class="post-metadata">

**Author:** ![Appelmoesje](https://awshq.com/letter_avatar_proxy/v4/letter/a/f04885/32.png) [@Appelmoesje](https://awshq.com/u/Appelmoesje)\
**Post date:** [September 20, 2021, 8:25am UTC](https://awshq.com/t/ecs-websites-and-load-balancers/13601/4 "2021-09-20T08:25:51Z")

</div>

> [@ElectricSpice](#):
>
> You can run ALB in two AZs while running your app in just one. Cross-AZ ALB traffic is free, so there won’t be additional cost for this.

Is this the default? Because I get Unhealty checks from the TG and the Service keeps restarting but we websites are working just fine.

---

<div class="post-metadata">

**Author:** ![ElectricSpice](https://awshq.com/letter_avatar_proxy/v4/letter/e/bb73d2/32.png) [@ElectricSpice](https://awshq.com/u/ElectricSpice)\
**Post date:** [September 20, 2021, 5:00pm UTC](https://awshq.com/t/ecs-websites-and-load-balancers/13601/5 "2021-09-20T17:00:28Z")

</div>

> [@Appelmoesje](#):
>
> Is this the default? Because I get Unhealty checks from the TG and the Service keeps restarting but we websites are working just fine.

Yeah, it’s on, no way to turn it off IIRC.

Don’t know why the health check would fail in one of the subnets. Routing issue? Anything unusual about your VPC?
