stakater / bugs

Stakater issue tracker
0 stars 1 forks source link

Reuse ELB's to optimize the infrastructure cost. #42

Open rasheedamir opened 7 years ago

rasheedamir commented 7 years ago

We should resuse ELB's; and shouldn't create new ELB's per ASG. That increases the cost quite considerably. Is there any specific reason to have one ELB per ASG?

Ideally we should have one ELB per environment. Or maybe we can consider not to have one?

hazim1093 commented 7 years ago

We can have some generic "soft loadbalancer" using nginx whose props can be uploaded through a key inside consul so, it can load balance for many for different services.

Something like, each service that wants to be loadbalanced can add a tag to itself "loadbalanceme" and then we can query all services which want "loadbalanceme" ... and build nginx config

hazim1093 commented 7 years ago

The reason for shifting to soft loadbalancers is that, we tried using consul for service discovery along with route53 but the docker containers who were told to use the dns for consul, were unable to resolve route53 entries after that.

so we planned to shift to consul totally instead of route53. In order to shift to consul we needed a dns entry for load balancers too. And ELBs could not be registered into consul as they were being registered in route53, so we decided to replace ELBs with soft load balancers

hazim1093 commented 7 years ago

we are now planning to use consul along with route53, by specifying the route53 nameserver as fallback dns in consul. So that we can access both route53 dns entries and consul dns entries simultaneously.
Once this is done, we would be able to use consul along with route53.

And won't need to "shift" to soft load balancers instead, we could optimize our load balancers, replace a few with soft load balancers and keep using ELBs for some cases