I might be trying to solve my problem the wrong way here; but we have a backend service that run calculations for about 15 seconds on 100% cpu usage. The idea was to have two EC2 instances fronted by a ELB that would split up the traffic (real: load) between the two machines. But i can't seem to configure this correctly.
Regardless of load on Instance #1 it keep throwing jobs to that machine, not Instance #2 as expected. Sometimes, regardless of load, Instance #2 pick up jobs and process them.
I'm using HTTP health-checks with an interval of 6 seconds.
An ideal situation would be if the ELB checked the current CPU-usage on Instance #1 and used Instance #2 if load is over 75%. Maybe load balancers doesn't work this way, but are there any other ways i can try?