BlockTraffic/AllowTraffic durations

0

Hello

I've been playing with using CodeDeploy to push our applications live, but it always takes ages doing the BlockTraffic and AllowTraffic steps.

The load balancer I'm using it with has connection draining set to 60s, but the block and allow traffic steps both take (reasonably reliably) 4m25 (265s) to complete which really does drag out the process.

Is there a way to modify this timeout that I've missed? Can I set the timeout on these steps in the appspec.yml even though these stages aren't documented for the hooks in that file?

Thanks

James

Edited by: jameseogden on Apr 28, 2017 5:59 AM

posta 7 anni fa4459 visualizzazioni
7 Risposte
0
Risposta accettata

Yes CodeDeploy depends on the ELB Health Check settings that you have configured your ELB with. After an instance is bound to the ELB, CodeDeploy wait for the status if the instance to be healthy ("inService") behind the load balancer. This health check is done by ELB and depends on the health check configuration you have set.

con risposta 7 anni fa
0

I'm having this exact issue and was working on this yesterday 4/27. I wonder if it's a coincidence/service issue?

Currently I have a classic ELB with two EC2 nodes. So, If I do a CodeDeploy OneAtATime, the whole process takes up to 25 minutes.

-m

con risposta 7 anni fa
0

I have the same issue. BlockTraffic and AllowTraffic take upwards of 5 minutes. At first I thought it was due to the fact that my load balancer's Connection Draining was set to 300 seconds. However, I disabled Connection Draining and got the same results. I then enabled Connection Draining and set timeout to 5 seconds and still got the same results.

UPDATE: CodeDeploy is dependent on the ELB Health Check settings. My settings had been:

Timeout 5 seconds
Interval 30 seconds
Unhealthy threshold 2
Healthy threshold 10

As a result, BlockTraffic and AllowTraffic were taking more than five minutes (30s interval * 10 healthy thresholds). After adjusting the settings to the following, BlockTraffic and AllowTraffic took about 20 seconds.

Timeout 2 seconds
Interval 5 seconds
Unhealthy threshold 2
Healthy threshold 2

Edited by: krao411 on May 3, 2017 7:05 PM

krao411
con risposta 7 anni fa
0

Resolved

Edited by: browner on Aug 6, 2017 4:09 AM

browner
con risposta 7 anni fa
0

I migrated my Classic ELB to Application... and now my BlockTraffic is taking more than 5 minutes, it used to be 1 min, health conditions are the same as before the only change is the migration to Application vs Classic ELB

DDd
con risposta 6 anni fa
0

I've had the same issue. Has there been any solutions to this yet?

con risposta 5 anni fa
0

At a deployment CodeDeploy deregisters the target from the Targetgroup. The Targetgroup now blocks new incoming traffic and gives the instance some time to finish open connections/requests. The instance is now in draining state, which is 300s by default. You can adjust it right here: deregistration-delay.

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#deregistration-delay

Cloudformation (YAML)

  TargetGroup:
    Type: AWS::ElasticLoadBalancingV2::TargetGroup
    Properties:
      TargetGroupAttributes:
        - Key: deregistration_delay.timeout_seconds
          Value: 60

That helped me to improve my deployment time.

con risposta 5 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande