

Come on Amazon, give ELB some love - dhendo
https://coderwall.com/p/0uqtia

======
hoov
I agree that ELBs need much more functionality.

In order to get around the lack of features, I only use the ELBs for SSL
termination (well, and DNS, and autoscaling). For anything fancier, I've
developed a coprocess that manages HAProxy behind the scenes. It leverages
Auto Scaling notifications to keep the backend instances in sync. It has a
REST API so that you can drive configuration, and it works in a master-master
configuration.

It's been running in production for about 9 months now, and has proven
invaluable. Having hooks at this layer is incredible. I'm able to get amazing
debugging information, I can "bumper" the site at the frontend, I can do 100%
zero downtime deployments with quick rollback, I can tarpit and rate limit,
etc.

Once I added enough "sugar", I started to realize that maybe AWS is doing it
right -- it'd be impossible to add all the features that every customer would
want to the ELB. However, WebSocket support and request draining are low-
hanging fruit. Same goes for the support for generic HTTP methods, which was
implemented some time ago.

------
de_dave
ELB already does weighting, directing requests depending instance type and
instance load. Can't find where in the docs this is clarified unfortunately.
Have witnessed this with my own eyes though!

Draining is a huge issue for us. Investigating ways to add a secondary layer
of balancing behind ELB to help mitigate it, which is completely silly. We
shouldn't need to do this. ELB should have supported gracefully terminating
connections from Day 1, IMO. Last I heard it was being 'considered'.

~~~
crazygringo
Docs talk about Availability Zones, but there is zero mention of weighting --
either that it's done, or that it's not done. This is a very strange omission.
Googling reveals that balancing is done by counting outstanding requests to
each instance:

[http://stackoverflow.com/questions/15789166/how-amazon-
elb-w...](http://stackoverflow.com/questions/15789166/how-amazon-elb-will-
distribute-requests-to-amazon-ec2-instances-of-different-ins)

[https://forums.aws.amazon.com/message.jspa?messageID=146233](https://forums.aws.amazon.com/message.jspa?messageID=146233)

~~~
jeffbarr
> But there is zero mention of weighting

It is called WRR (Weighted Round Robin). Here are some docs to get you
started:

[http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/Wei...](http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/WeightedResourceRecordSets.html)

~~~
crazygringo
That's for Route 53 (DNS). The subject here is ELB, a different AWS
technology.

~~~
jeffbarr
Yes, indeed! My thinking was that you could use this Route 53 feature to route
traffic across several ELBs to accomplish the desired effect.

~~~
dhendo
Yes, sounds like a good idea (if you have control of the DNS)

------
felixge
I'd also love to see support for draining - and it seems like we might be in
luck in the near future:

[https://forums.aws.amazon.com/thread.jspa?threadID=61278&sta...](https://forums.aws.amazon.com/thread.jspa?threadID=61278&start=75&tstart=0)

^-- BenF@AWS commented on June 10th saying that amazon is now actively working
on it!

~~~
dsl
Draining is easy. Your health check should be hitting a url like '/ping'
anyway which responds with an OK if the box is in a reasonable state and
willing to serve traffic.

I always add an additional check to see if a file called /tmp/down exists, and
if it does, return a 500 for the health checks. Existing clients will continue
to be served but that instance will get no new connections.

------
verelo
I would love to be able to not just attached EC2 instances to ELB's, but also
RDS instances.

~~~
threeseed
As unrealistic as it is I would love to be able to attach non-Amazon servers.

It's hard to find load balancing as a service.

------
progolferyo
How about more control over the software & configuration side of ELB as well?
If you could control more things that nginx or haproxy let you control, I
think there would be a lot less need for another routing mechanism behind ELB.

In addition to weighting, we need an nginx layer for different app pools,
custom routing options, max connections limits, request queueing, url
rewriting, static content serving for specific requests. The list goes on but
these things could easily be brought up into the ELB layer.

------
forthewyn
I also wish ELB would get security groups like EC2 and RDS already have.

I think a LOT of people revert to HAPRoxy on an EC2 instance because of this.

------
madaxe
They have been - and they successfully nerfed half a dozen of ours (public
facing) when they did the migration about three weeks back. Most recent
upgrade added the ability for R53 to do latency based and healthcheck based
DNS (with ELBs, that is), which is pretty shiny. As others have noted, it
already auto-weights.

