Is there a way to speed up AWS CodeDeployHow can I determine what caused a sudden increase of traffic to my AWS servers?How to install PHP 5.4 on AWS OpsworksAnsible Multiple Application Role ApproachWhy does AWS CodeDeploy time out sooner than the specified timeoutWhat does ElasticBeanstalk error “Application version is unusable and cannot be used with an environment” mean?Amazon Web Services CodeDeploy HEALTH_CONSTRAINTS ErrorAWS Auto Scaling and CodeDeploy never leaves Pending:WaitAWS deploying strategy for cached page/appCircleCI deploy to AWS EC2AWS Opsworks slow deployments when the server is running for long periods
Should I simplify my writing in a foreign country?
Are pressure-treated posts that have been submerged for a few days ruined?
Is it normal for gliders not to have attitude indicators?
How to deal with employer who keeps me at work after working hours
Should homeowners insurance cover the cost of the home?
Out of scope work duties and resignation
Why is "breaking the mould" positively connoted?
How does summation index shifting work?
Will 700 more planes a day fly because of the Heathrow expansion?
Voltage Balun 1:1
Feasibility of lava beings?
What do I do if my advisor made a mistake?
How do I, as a DM, handle a party that decides to set up an ambush in a dungeon?
What do "Sech" and "Vich" mean in this sentence?
Can my 2 children, aged 10 and 12, who are US citizens, travel to the USA on expired American passports?
Is an HNN extension of a virtually torsion-free group virtually torsion-free?
Why did the Apollo 13 crew extend the LM landing gear?
Why do these characters still seem to be the same age after the events of Endgame?
Install LibreOffice-Writer Only not LibreOffice whole package
How to pass hash as password to ssh server
Why do people keep telling me that I am a bad photographer?
Agena docking and RCS Brakes in First Man
A factorization game
When an imagined world resembles or has similarities with a famous world
Is there a way to speed up AWS CodeDeploy
How can I determine what caused a sudden increase of traffic to my AWS servers?How to install PHP 5.4 on AWS OpsworksAnsible Multiple Application Role ApproachWhy does AWS CodeDeploy time out sooner than the specified timeoutWhat does ElasticBeanstalk error “Application version is unusable and cannot be used with an environment” mean?Amazon Web Services CodeDeploy HEALTH_CONSTRAINTS ErrorAWS Auto Scaling and CodeDeploy never leaves Pending:WaitAWS deploying strategy for cached page/appCircleCI deploy to AWS EC2AWS Opsworks slow deployments when the server is running for long periods
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm using AWS CodeDeploy to deploy my sites, and I noticed it's not very consistent in speed; sometimes it's pretty fast, but other times each step of a deployment can take minutes. This is pretty annoying when a deployment should be performed fast, in case of bugs or outages.
I can't find any documentation on the speed of CodeDeploy though, and also I can't seem to find any logic in when it's slow or when it's fast. Is there any way to speed it up and is there any way to know what's taking so long?
amazon-web-services deployment
add a comment |
I'm using AWS CodeDeploy to deploy my sites, and I noticed it's not very consistent in speed; sometimes it's pretty fast, but other times each step of a deployment can take minutes. This is pretty annoying when a deployment should be performed fast, in case of bugs or outages.
I can't find any documentation on the speed of CodeDeploy though, and also I can't seem to find any logic in when it's slow or when it's fast. Is there any way to speed it up and is there any way to know what's taking so long?
amazon-web-services deployment
add a comment |
I'm using AWS CodeDeploy to deploy my sites, and I noticed it's not very consistent in speed; sometimes it's pretty fast, but other times each step of a deployment can take minutes. This is pretty annoying when a deployment should be performed fast, in case of bugs or outages.
I can't find any documentation on the speed of CodeDeploy though, and also I can't seem to find any logic in when it's slow or when it's fast. Is there any way to speed it up and is there any way to know what's taking so long?
amazon-web-services deployment
I'm using AWS CodeDeploy to deploy my sites, and I noticed it's not very consistent in speed; sometimes it's pretty fast, but other times each step of a deployment can take minutes. This is pretty annoying when a deployment should be performed fast, in case of bugs or outages.
I can't find any documentation on the speed of CodeDeploy though, and also I can't seem to find any logic in when it's slow or when it's fast. Is there any way to speed it up and is there any way to know what's taking so long?
amazon-web-services deployment
amazon-web-services deployment
asked Feb 15 '16 at 11:00
Jasper KennisJasper Kennis
194112
194112
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
CodeDeploy does very little by default - it grabs the code from S3 or Github, then runs your scripts per the appspec.yml file's instructions.
If your deployments are grabbing gigabytes of data from S3, you'll find that takes some time for the data transfer (particularly on smaller EC2 instances with limited bandwidth), but other than that deployment delays are much more likely to be due to whatever you're doing in your deployment scripts.
The steps in a CodeDeploy deployment are:
- ApplicationStop - you control this hook
- DownloadBundle - CodeDeploy grabs code from S3/Github
- BeforeInstall - you control this hook
- Install - CodeDeploy copies code from a temp location to the final destination
- AfterInstall - you control this hook
- ApplicationStart - you control this hook
- ValidateService - you control this hook
The bolded ones are up to CodeDeploy, the others are up to you. If you're seeing varying delays in the bolded ones, contact AWS support, but otherwise chances are you need to investigate your hooks.
Yeah, my own scripts are simple and fast. It's the Download bundle step that often takes minutes to run, and my project isn't that big; just as often it just takes seconds. I don't have the dev support plan tho, and I'm not willing to pay for it just for this, so I'll just let it be for now.
– Jasper Kennis
Feb 16 '16 at 11:04
Checked it again, the problem has to be the bandwidth; we're using a small instance type for our staging server and bigger once for production, and it's always staging that is being slow.
– Jasper Kennis
Feb 17 '16 at 11:32
@JasperKennis Yeah, the smaller instance types can be fairly bandwidth-limited, particularly if you're on a host with noisy neighbors. That'd make sense.
– ceejayoz
Feb 17 '16 at 11:47
add a comment |
BlockTraffic and AllowTraffic
Simply adjusting your target group's health check settings can shave off a couple minutes.
Before


After


Explanation
This works because BlockTraffic and AllowTraffic both wait for successful health checks. The default health check interval is 1 check every 30 seconds, and a successful health check needs 5 consecutive 200 responses. Thus it takes more than 2 min 30 seconds by default. And that's for every EC2 instance. Decreasing the health check interval and limiting the number of successful checks needed will improve deployment time.
After making this change I'm gettingScript at specified location: ... failed to complete in 5 seconds. (it is set in appspec.yml->hooks:->BeforeInstall:) (please tell me why)
– Yevgeniy Afanasyev
Dec 14 '18 at 4:25
Is there a timeout set in the BeforeInstall config? docs.aws.amazon.com/codedeploy/latest/userguide/…
– Peter Tao
Dec 14 '18 at 13:21
Thank you, now I see it is not related, but rather a coincident.
– Yevgeniy Afanasyev
Dec 16 '18 at 21:21
add a comment |
Another setting to check is the Target Group's "Deregistration delay". My health check settings were already low and this was the bottleneck in my case.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f757262%2fis-there-a-way-to-speed-up-aws-codedeploy%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
CodeDeploy does very little by default - it grabs the code from S3 or Github, then runs your scripts per the appspec.yml file's instructions.
If your deployments are grabbing gigabytes of data from S3, you'll find that takes some time for the data transfer (particularly on smaller EC2 instances with limited bandwidth), but other than that deployment delays are much more likely to be due to whatever you're doing in your deployment scripts.
The steps in a CodeDeploy deployment are:
- ApplicationStop - you control this hook
- DownloadBundle - CodeDeploy grabs code from S3/Github
- BeforeInstall - you control this hook
- Install - CodeDeploy copies code from a temp location to the final destination
- AfterInstall - you control this hook
- ApplicationStart - you control this hook
- ValidateService - you control this hook
The bolded ones are up to CodeDeploy, the others are up to you. If you're seeing varying delays in the bolded ones, contact AWS support, but otherwise chances are you need to investigate your hooks.
Yeah, my own scripts are simple and fast. It's the Download bundle step that often takes minutes to run, and my project isn't that big; just as often it just takes seconds. I don't have the dev support plan tho, and I'm not willing to pay for it just for this, so I'll just let it be for now.
– Jasper Kennis
Feb 16 '16 at 11:04
Checked it again, the problem has to be the bandwidth; we're using a small instance type for our staging server and bigger once for production, and it's always staging that is being slow.
– Jasper Kennis
Feb 17 '16 at 11:32
@JasperKennis Yeah, the smaller instance types can be fairly bandwidth-limited, particularly if you're on a host with noisy neighbors. That'd make sense.
– ceejayoz
Feb 17 '16 at 11:47
add a comment |
CodeDeploy does very little by default - it grabs the code from S3 or Github, then runs your scripts per the appspec.yml file's instructions.
If your deployments are grabbing gigabytes of data from S3, you'll find that takes some time for the data transfer (particularly on smaller EC2 instances with limited bandwidth), but other than that deployment delays are much more likely to be due to whatever you're doing in your deployment scripts.
The steps in a CodeDeploy deployment are:
- ApplicationStop - you control this hook
- DownloadBundle - CodeDeploy grabs code from S3/Github
- BeforeInstall - you control this hook
- Install - CodeDeploy copies code from a temp location to the final destination
- AfterInstall - you control this hook
- ApplicationStart - you control this hook
- ValidateService - you control this hook
The bolded ones are up to CodeDeploy, the others are up to you. If you're seeing varying delays in the bolded ones, contact AWS support, but otherwise chances are you need to investigate your hooks.
Yeah, my own scripts are simple and fast. It's the Download bundle step that often takes minutes to run, and my project isn't that big; just as often it just takes seconds. I don't have the dev support plan tho, and I'm not willing to pay for it just for this, so I'll just let it be for now.
– Jasper Kennis
Feb 16 '16 at 11:04
Checked it again, the problem has to be the bandwidth; we're using a small instance type for our staging server and bigger once for production, and it's always staging that is being slow.
– Jasper Kennis
Feb 17 '16 at 11:32
@JasperKennis Yeah, the smaller instance types can be fairly bandwidth-limited, particularly if you're on a host with noisy neighbors. That'd make sense.
– ceejayoz
Feb 17 '16 at 11:47
add a comment |
CodeDeploy does very little by default - it grabs the code from S3 or Github, then runs your scripts per the appspec.yml file's instructions.
If your deployments are grabbing gigabytes of data from S3, you'll find that takes some time for the data transfer (particularly on smaller EC2 instances with limited bandwidth), but other than that deployment delays are much more likely to be due to whatever you're doing in your deployment scripts.
The steps in a CodeDeploy deployment are:
- ApplicationStop - you control this hook
- DownloadBundle - CodeDeploy grabs code from S3/Github
- BeforeInstall - you control this hook
- Install - CodeDeploy copies code from a temp location to the final destination
- AfterInstall - you control this hook
- ApplicationStart - you control this hook
- ValidateService - you control this hook
The bolded ones are up to CodeDeploy, the others are up to you. If you're seeing varying delays in the bolded ones, contact AWS support, but otherwise chances are you need to investigate your hooks.
CodeDeploy does very little by default - it grabs the code from S3 or Github, then runs your scripts per the appspec.yml file's instructions.
If your deployments are grabbing gigabytes of data from S3, you'll find that takes some time for the data transfer (particularly on smaller EC2 instances with limited bandwidth), but other than that deployment delays are much more likely to be due to whatever you're doing in your deployment scripts.
The steps in a CodeDeploy deployment are:
- ApplicationStop - you control this hook
- DownloadBundle - CodeDeploy grabs code from S3/Github
- BeforeInstall - you control this hook
- Install - CodeDeploy copies code from a temp location to the final destination
- AfterInstall - you control this hook
- ApplicationStart - you control this hook
- ValidateService - you control this hook
The bolded ones are up to CodeDeploy, the others are up to you. If you're seeing varying delays in the bolded ones, contact AWS support, but otherwise chances are you need to investigate your hooks.
answered Feb 15 '16 at 14:43
ceejayozceejayoz
27.2k66594
27.2k66594
Yeah, my own scripts are simple and fast. It's the Download bundle step that often takes minutes to run, and my project isn't that big; just as often it just takes seconds. I don't have the dev support plan tho, and I'm not willing to pay for it just for this, so I'll just let it be for now.
– Jasper Kennis
Feb 16 '16 at 11:04
Checked it again, the problem has to be the bandwidth; we're using a small instance type for our staging server and bigger once for production, and it's always staging that is being slow.
– Jasper Kennis
Feb 17 '16 at 11:32
@JasperKennis Yeah, the smaller instance types can be fairly bandwidth-limited, particularly if you're on a host with noisy neighbors. That'd make sense.
– ceejayoz
Feb 17 '16 at 11:47
add a comment |
Yeah, my own scripts are simple and fast. It's the Download bundle step that often takes minutes to run, and my project isn't that big; just as often it just takes seconds. I don't have the dev support plan tho, and I'm not willing to pay for it just for this, so I'll just let it be for now.
– Jasper Kennis
Feb 16 '16 at 11:04
Checked it again, the problem has to be the bandwidth; we're using a small instance type for our staging server and bigger once for production, and it's always staging that is being slow.
– Jasper Kennis
Feb 17 '16 at 11:32
@JasperKennis Yeah, the smaller instance types can be fairly bandwidth-limited, particularly if you're on a host with noisy neighbors. That'd make sense.
– ceejayoz
Feb 17 '16 at 11:47
Yeah, my own scripts are simple and fast. It's the Download bundle step that often takes minutes to run, and my project isn't that big; just as often it just takes seconds. I don't have the dev support plan tho, and I'm not willing to pay for it just for this, so I'll just let it be for now.
– Jasper Kennis
Feb 16 '16 at 11:04
Yeah, my own scripts are simple and fast. It's the Download bundle step that often takes minutes to run, and my project isn't that big; just as often it just takes seconds. I don't have the dev support plan tho, and I'm not willing to pay for it just for this, so I'll just let it be for now.
– Jasper Kennis
Feb 16 '16 at 11:04
Checked it again, the problem has to be the bandwidth; we're using a small instance type for our staging server and bigger once for production, and it's always staging that is being slow.
– Jasper Kennis
Feb 17 '16 at 11:32
Checked it again, the problem has to be the bandwidth; we're using a small instance type for our staging server and bigger once for production, and it's always staging that is being slow.
– Jasper Kennis
Feb 17 '16 at 11:32
@JasperKennis Yeah, the smaller instance types can be fairly bandwidth-limited, particularly if you're on a host with noisy neighbors. That'd make sense.
– ceejayoz
Feb 17 '16 at 11:47
@JasperKennis Yeah, the smaller instance types can be fairly bandwidth-limited, particularly if you're on a host with noisy neighbors. That'd make sense.
– ceejayoz
Feb 17 '16 at 11:47
add a comment |
BlockTraffic and AllowTraffic
Simply adjusting your target group's health check settings can shave off a couple minutes.
Before


After


Explanation
This works because BlockTraffic and AllowTraffic both wait for successful health checks. The default health check interval is 1 check every 30 seconds, and a successful health check needs 5 consecutive 200 responses. Thus it takes more than 2 min 30 seconds by default. And that's for every EC2 instance. Decreasing the health check interval and limiting the number of successful checks needed will improve deployment time.
After making this change I'm gettingScript at specified location: ... failed to complete in 5 seconds. (it is set in appspec.yml->hooks:->BeforeInstall:) (please tell me why)
– Yevgeniy Afanasyev
Dec 14 '18 at 4:25
Is there a timeout set in the BeforeInstall config? docs.aws.amazon.com/codedeploy/latest/userguide/…
– Peter Tao
Dec 14 '18 at 13:21
Thank you, now I see it is not related, but rather a coincident.
– Yevgeniy Afanasyev
Dec 16 '18 at 21:21
add a comment |
BlockTraffic and AllowTraffic
Simply adjusting your target group's health check settings can shave off a couple minutes.
Before


After


Explanation
This works because BlockTraffic and AllowTraffic both wait for successful health checks. The default health check interval is 1 check every 30 seconds, and a successful health check needs 5 consecutive 200 responses. Thus it takes more than 2 min 30 seconds by default. And that's for every EC2 instance. Decreasing the health check interval and limiting the number of successful checks needed will improve deployment time.
After making this change I'm gettingScript at specified location: ... failed to complete in 5 seconds. (it is set in appspec.yml->hooks:->BeforeInstall:) (please tell me why)
– Yevgeniy Afanasyev
Dec 14 '18 at 4:25
Is there a timeout set in the BeforeInstall config? docs.aws.amazon.com/codedeploy/latest/userguide/…
– Peter Tao
Dec 14 '18 at 13:21
Thank you, now I see it is not related, but rather a coincident.
– Yevgeniy Afanasyev
Dec 16 '18 at 21:21
add a comment |
BlockTraffic and AllowTraffic
Simply adjusting your target group's health check settings can shave off a couple minutes.
Before


After


Explanation
This works because BlockTraffic and AllowTraffic both wait for successful health checks. The default health check interval is 1 check every 30 seconds, and a successful health check needs 5 consecutive 200 responses. Thus it takes more than 2 min 30 seconds by default. And that's for every EC2 instance. Decreasing the health check interval and limiting the number of successful checks needed will improve deployment time.
BlockTraffic and AllowTraffic
Simply adjusting your target group's health check settings can shave off a couple minutes.
Before


After


Explanation
This works because BlockTraffic and AllowTraffic both wait for successful health checks. The default health check interval is 1 check every 30 seconds, and a successful health check needs 5 consecutive 200 responses. Thus it takes more than 2 min 30 seconds by default. And that's for every EC2 instance. Decreasing the health check interval and limiting the number of successful checks needed will improve deployment time.
edited Jan 8 '18 at 23:43
answered Jan 8 '18 at 23:37
Peter TaoPeter Tao
28123
28123
After making this change I'm gettingScript at specified location: ... failed to complete in 5 seconds. (it is set in appspec.yml->hooks:->BeforeInstall:) (please tell me why)
– Yevgeniy Afanasyev
Dec 14 '18 at 4:25
Is there a timeout set in the BeforeInstall config? docs.aws.amazon.com/codedeploy/latest/userguide/…
– Peter Tao
Dec 14 '18 at 13:21
Thank you, now I see it is not related, but rather a coincident.
– Yevgeniy Afanasyev
Dec 16 '18 at 21:21
add a comment |
After making this change I'm gettingScript at specified location: ... failed to complete in 5 seconds. (it is set in appspec.yml->hooks:->BeforeInstall:) (please tell me why)
– Yevgeniy Afanasyev
Dec 14 '18 at 4:25
Is there a timeout set in the BeforeInstall config? docs.aws.amazon.com/codedeploy/latest/userguide/…
– Peter Tao
Dec 14 '18 at 13:21
Thank you, now I see it is not related, but rather a coincident.
– Yevgeniy Afanasyev
Dec 16 '18 at 21:21
After making this change I'm getting
Script at specified location: ... failed to complete in 5 seconds. (it is set in appspec.yml->hooks:->BeforeInstall:) (please tell me why)– Yevgeniy Afanasyev
Dec 14 '18 at 4:25
After making this change I'm getting
Script at specified location: ... failed to complete in 5 seconds. (it is set in appspec.yml->hooks:->BeforeInstall:) (please tell me why)– Yevgeniy Afanasyev
Dec 14 '18 at 4:25
Is there a timeout set in the BeforeInstall config? docs.aws.amazon.com/codedeploy/latest/userguide/…
– Peter Tao
Dec 14 '18 at 13:21
Is there a timeout set in the BeforeInstall config? docs.aws.amazon.com/codedeploy/latest/userguide/…
– Peter Tao
Dec 14 '18 at 13:21
Thank you, now I see it is not related, but rather a coincident.
– Yevgeniy Afanasyev
Dec 16 '18 at 21:21
Thank you, now I see it is not related, but rather a coincident.
– Yevgeniy Afanasyev
Dec 16 '18 at 21:21
add a comment |
Another setting to check is the Target Group's "Deregistration delay". My health check settings were already low and this was the bottleneck in my case.
add a comment |
Another setting to check is the Target Group's "Deregistration delay". My health check settings were already low and this was the bottleneck in my case.
add a comment |
Another setting to check is the Target Group's "Deregistration delay". My health check settings were already low and this was the bottleneck in my case.
Another setting to check is the Target Group's "Deregistration delay". My health check settings were already low and this was the bottleneck in my case.
answered Apr 25 at 20:47
AaronAaron
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f757262%2fis-there-a-way-to-speed-up-aws-codedeploy%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown