{"id":367102,"date":"2024-05-21T03:14:03","date_gmt":"2024-05-21T03:14:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=367102"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=367102","title":{"rendered":"<span>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Elastic Beanstalk \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u0421\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u044f\u044f \u0441\u0442\u0430\u0442\u044c\u044f, \u043a\u0430\u043a \u0432\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Elastic Beanstalk, \u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e &#8212; \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 AWS \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 TagretGroup \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0439.  <\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 Elastic Beanstalk<\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f5d\/9de\/fce\/f5d9defcea7285fc2484ba69a1c65b5b.png\" alt=\"pic 0. Elastic Beans  \" title=\"pic 0. Elastic Beans  \" width=\"799\" height=\"379\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f5d\/9de\/fce\/f5d9defcea7285fc2484ba69a1c65b5b.png\"\/><\/p>\n<div><figcaption>pic 0. Elastic Beans  <\/figcaption><\/div>\n<\/figure>\n<p>Elastic Beanstalk \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0443\u044e \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435. EB \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b EC2 (\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b), \u0433\u0440\u0443\u043f\u043f\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043e\u0431\u044a\u0435\u043a\u0442\u044b S3 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 RDS, \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 Elastic Load Balancing \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u0430\u0442\u0440\u0430\u0442\u0430\u043c\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0443\u0441\u0438\u043b\u0438\u0439 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 Elastic Beanstalk \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (<strong>Application<\/strong>) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043b\u0443\u0436\u0438\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>\u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 (<strong>Environment<\/strong>) \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 AWS \u0438 \u0441\u043b\u0443\u0436\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0440\u043e\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0438\u043b\u0438 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ol>\n<p>\u0420\u0435\u0441\u0443\u0440\u0441\u044b, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/concepts.html\" rel=\"noopener noreferrer nofollow\"><strong>EC2<\/strong><\/a>\u00a0(<em>Elastic Compute Cloud<\/em>) &#8212; \u044d\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0430\u0440\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 AWS \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.aws.amazon.com\/elasticloadbalancing\/latest\/application\/load-balancer-target-groups.html\" rel=\"noopener noreferrer nofollow\"><strong>Target Group<\/strong><\/a>\u00a0&#8212; \u044d\u0442\u043e \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0432 AWS \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u043e\u043c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. Target Group \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0443\u0434\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u0442\u0440\u0430\u0444\u0438\u043a, \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 (<em>Load Balancer<\/em>). \u041a\u0430\u0436\u0434\u0430\u044f Target Group \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 EC2 \u043b\u0438\u0431\u043e \u043b\u044f\u043c\u0431\u0434\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.aws.amazon.com\/autoscaling\/ec2\/userguide\/auto-scaling-groups.html\" rel=\"noopener noreferrer nofollow\"><strong>Auto Scaling Groups<\/strong><\/a>\u00a0\u0434\u0430\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 EC2 \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438\/\u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f EB, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0442\u0435\u043c\u0435 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<h3>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/490\/246\/6d0\/4902466d07c97192e9f4ec4d08b8ea83.png\" alt=\"pic 1. EB Environment Events   \" title=\"pic 1. EB Environment Events   \" width=\"1393\" height=\"122\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/490\/246\/6d0\/4902466d07c97192e9f4ec4d08b8ea83.png\"\/><\/p>\n<div><figcaption>pic 1. EB Environment Events   <\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435\u00a0<a href=\"https:\/\/aws.amazon.com\/ec2\/instance-types\/c5\/?nc1=h_ls\" rel=\"noopener noreferrer nofollow\">c5.xlarge<\/a>\u00a0\u0438 \u0432\u0441\u0435 status checks \u043e\u0442 AWS \u0432\u044b\u0434\u0430\u0432\u0430\u043b\u0438 &#171;<em>Success<\/em>&#171;, \u043c\u0430\u0448\u0438\u043d\u0430 \u0431\u044b\u043b\u0430 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 &#171;<em>Running<\/em>&#171;, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u043b\u043e. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043b\u043e\u0433\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u0440\u044b\u043b\u0430\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0435\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/iis\/\" rel=\"noopener noreferrer nofollow\">IIS<\/a>\u00a0(\u044d\u0442\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f &#8212; \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/iis\/configuration\/system.applicationhost\/applicationpools\/add\/recycling\/periodicrestart\/#configuration\" rel=\"noopener noreferrer nofollow\">\u043a\u0430\u0436\u0434\u044b\u0435 29 \u0447\u0430\u0441\u043e\u0432<\/a>, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e).<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 4 (!) \u043c\u0438\u043d\u0443\u0442\u044b. \u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f 4 \u043c\u0438\u043d\u0443\u0442\u044b \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u044b \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430\u00a0<a href=\"https:\/\/newrelic.com\/\" rel=\"noopener noreferrer nofollow\">NewRelic<\/a>. \u0412\u0441\u0451 \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0438\u0437 \u0435\u0433\u043e \u043b\u043e\u0433\u043e\u0432 &#8212; \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u043b \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0444\u0430\u043a\u0442\u044b \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0442\u043a\u043b\u0438\u043a\u0430 \u0438 \u043f\u0440. \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0444\u0438\u0447\u0438 ElasticBeanstalk \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0418 \u0442\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u044b\u0441\u043b\u0438 &#8212; \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u044b, \u043d\u043e \u0438 \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0447\u0438\u0441\u043b\u043e, \u043b\u0438\u0431\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c \u043f\u0440\u0438 \u043c\u0430\u043b\u043e\u0439.<\/p>\n<h3>Elastic Beanstalk<\/h3>\n<p>EB \u043d\u0435 \u0437\u0430\u0442\u043e\u0447\u0435\u043d \u043f\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0430 \u0441 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u043e\u043c \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u0441\u044d\u0442\u0430\u043f:<\/p>\n<ul>\n<li>\n<p>2x c5.large (c5.large \u0441\u0442\u043e\u0438\u0442\u00a0<a href=\"https:\/\/aws.amazon.com\/ec2\/pricing\/on-demand\/\" rel=\"noopener noreferrer nofollow\">\u0440\u043e\u0432\u043d\u043e \u0432 2 \u0440\u0430\u0437\u0430 \u0434\u0435\u0448\u0435\u0432\u043b\u0435<\/a>, \u0447\u0435\u043c c5.xlarge)<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 5 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 >80%, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u043d\u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0441<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 5 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 &lt;40%, \u043c\u044b \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u043d\u0441\u0442\u0430\u043d\u0441<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/04d\/1d1\/1b1\/04d1d11b1b5ae0a2cec0abc46649963d.png\" alt=\"pic 2. configuration  \" title=\"pic 2. configuration  \" width=\"1175\" height=\"907\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/04d\/1d1\/1b1\/04d1d11b1b5ae0a2cec0abc46649963d.png\"\/><\/p>\n<div><figcaption>pic 2. configuration  <\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">Resources:   AWSEBAutoScalingGroup:     Type: \"AWS::AutoScaling::AutoScalingGroup\"     Properties:       MinSize: 2       MaxSize: 3          AWSEBCloudwatchAlarmHigh:     Type: \"AWS::CloudWatch::Alarm\"     Properties:       EvaluationPeriods: 1        MetricName: CPUUtilization       Namespace: AWS\/EC2       Period: 300       Statistic: Average       ComparisonOperator: GreaterThanOrEqualToThreshold       Threshold: 80       Unit: Percent       AlarmActions:         - Ref: \"AWSEBAutoScalingScaleUpPolicy\"            AWSEBCloudwatchAlarmLow:     Type: \"AWS::CloudWatch::Alarm\"     Properties:       EvaluationPeriods: 1       MetricName: CPUUtilization       Namespace: AWS\/EC2       Period: 300       Statistic: Average       ComparisonOperator: LessThanOrEqualToThreshold       Threshold: 40       Unit: Percent       AlarmActions:         - Ref: \"AWSEBAutoScalingScaleDownPolicy\"            AWSEBAutoScalingScaleUpPolicy:     Type: \"AWS::AutoScaling::ScalingPolicy\"     Properties:       AdjustmentType: ChangeInCapacity       AutoScalingGroupName:         Ref: \"AWSEBAutoScalingGroup\"       Cooldown: 360       ScalingAdjustment: 1<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043e &#8212; \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e AWS \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u0441\u0435\u00a0<a href=\"https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/monitoring-system-instance-status-check.html\" rel=\"noopener noreferrer nofollow\"><em>Status Check<\/em><\/a>\u00a0\u043d\u0430 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442, \u0442\u043e \u043d\u0430 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0444\u0438\u043a. \u0427\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0435\u0439\u0441\u0430 &#8212; \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u044d\u0442\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c \u043d\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 HealthCheck,\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/aspnet\/core\/host-and-deploy\/health-checks?view=aspnetcore-8.0\" rel=\"noopener noreferrer nofollow\">\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 .NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438<\/a>.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c!<\/p>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0414\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f\u00a0<strong>Environment ID<\/strong>\u00a0\u0438 \u0432\u043e\u0442 \u044d\u0442\u0438 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 \u0432 \u0441\u0430\u0439\u0434\u0431\u0430\u0440\u0435 EC2:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/021\/976\/248\/021976248e2e7868a94c265e98b51dc8.png\" alt=\"pic 3. EC2 Sidebar  \" title=\"pic 3. EC2 Sidebar  \" width=\"311\" height=\"920\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/021\/976\/248\/021976248e2e7868a94c265e98b51dc8.png\"\/><\/p>\n<div><figcaption>pic 3. EC2 Sidebar  <\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0439\u0434\u0435\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443:<\/p>\n<h3>1) Target Groups<\/h3>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c\u0438 uptime&#8217;\u0430 \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e TG.<br \/>\u0414\u043b\u044f \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 unhealthy \u043c\u0430\u0448\u0438\u043d\u044b \u0447\u0435\u0440\u0435\u0437 1 \u043c\u0438\u043d\u0443\u0442\u0443:<\/p>\n<p>3 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a\u0430\u0436\u0434\u044b\u0435 15 \u0441\u0435\u043a\u0443\u043d\u0434 + \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u044b (5 \u0441\u0435\u043a) = 1 \u043c\u0438\u043d\u0443\u0442\u0430<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bb0\/541\/6fc\/bb05416fc4eea39d41755204f1e16a2d.png\" alt=\"pic 4. Tagret Group health check settings  \" title=\"pic 4. Tagret Group health check settings  \" width=\"937\" height=\"1433\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bb0\/541\/6fc\/bb05416fc4eea39d41755204f1e16a2d.png\"\/><\/p>\n<div><figcaption>pic 4. Tagret Group health check settings  <\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435\u00a0<em>Attributes\u00a0<\/em>\u0435\u0441\u0442\u044c \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<em>\u00a0&#8212;\u00a0<\/em><strong>Deregistration delay.\u00a0<\/strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u043d\u0441\u0430\u043dc \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043f\u043e \/hc, \u0442\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0437\u0430 \u0432\u0440\u0435\u043c\u044f, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0432 \u044d\u0442\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c80\/7e8\/dc3\/c807e8dc3d11d5040c6fa3da3cf4fb73.png\" alt=\"pic 5. TG Deregistration Delay  \" title=\"pic 5. TG Deregistration Delay  \" width=\"770\" height=\"387\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c80\/7e8\/dc3\/c807e8dc3d11d5040c6fa3da3cf4fb73.png\"\/><\/p>\n<div><figcaption>pic 5. TG Deregistration Delay  <\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">Resources:   AWSEBV2LoadBalancerTargetGroup:     Type: \"AWS::ElasticLoadBalancingV2::TargetGroup\"     Properties:       HealthCheckIntervalSeconds: 15       HealthCheckPath: \/hc       HealthCheckProtocol: HTTP       HealthCheckTimeoutSeconds: 5       HealthyThresholdCount: 5       UnhealthyThresholdCount: 3       TargetGroupAttributes:         - Key: deregistration_delay.timeout_seconds           Value: '20'<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>2) Auto Scaling Groups<\/h3>\n<h4>2.1 Enable HealthChecks &amp; Set grace period<\/h4>\n<p>\u0421\u0430\u043c\u044b\u0439 \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0441\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u0448\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9b0\/329\/03e\/9b032903eba2c8a663b46b79b15e244b.png\" alt=\"pic. 6  \" title=\"pic. 6  \" width=\"810\" height=\"190\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9b0\/329\/03e\/9b032903eba2c8a663b46b79b15e244b.png\"\/><\/p>\n<div><figcaption>pic. 6  <\/figcaption><\/div>\n<\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e ELB, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 &#171;<em>Turn on Elastic Load Balancing health checks<\/em>&#187; \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u00a0<a href=\"https:\/\/docs.aws.amazon.com\/autoscaling\/ec2\/userguide\/health-check-grace-period.html\" rel=\"noopener noreferrer nofollow\"><em>Health check grace period<\/em><\/a>.<\/p>\n<p><em>Health check grace period<\/em>\u00a0&#8212; \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e AWS \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 (\u0438\u043b\u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445) \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445\u00a0<a href=\"https:\/\/docs.aws.amazon.com\/autoscaling\/ec2\/userguide\/auto-scaling-groups.html\" rel=\"noopener noreferrer nofollow\">Auto Scaling Group<\/a>, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 health check.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0441\u0432\u043e\u0451 \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0435\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0415\u0441\u043b\u0438 \u0431\u044b AWS \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043b\u0438 \u043e\u043d\u043e \u043a\u0430\u043a \u043d\u0430\u0434\u043e, \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0438\u0434\u0435\u043b, \u0447\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0442\u0430\u043a (\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0441\u0442\u043e \u0435\u0449\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0440\u0435\u043c\u044f, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430), \u0442\u043e AWS \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u043b \u0431\u044b \u0435\u0433\u043e \u043a\u0430\u043a unhealthy \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4f8\/8d3\/11f\/4f88d311f25a449f3d37b069a3968ec5.png\" alt=\"pic. 7  \" title=\"pic. 7  \" width=\"926\" height=\"712\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4f8\/8d3\/11f\/4f88d311f25a449f3d37b069a3968ec5.png\"\/><\/p>\n<div><figcaption>pic. 7  <\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0434\u0431\u043e\u0440 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e grace period &#8212; \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f. \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u0440\u0438\u043b\u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e\u00a0<strong>\u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c<\/strong>\u00a0\u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0443\u0436\u043d\u043e \u043d\u043e\u0432\u043e\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u043d\u0430\u0447\u0430\u043b\u043e \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c 200-\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u0442\u043e \u043c\u0435\u043d\u0435\u0435 8 \u043c\u0438\u043d\u0443\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0441 \u0437\u0430\u043f\u0430\u0441\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 500 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u0430\u043a\u0442\u043e\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f &#8212; \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0411\u0414 \u0438\u043b\u0438 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c grace period \u0432\u0440\u0443\u0447\u043d\u0443\u044e<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">Resources:   AWSEBAutoScalingGroup:     Type: \"AWS::AutoScaling::AutoScalingGroup\"     Properties:       HealthCheckType: ELB       HealthCheckGracePeriod: 500<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h4>2.2 Instance maintenance policy<\/h4>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c ELB \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c \u043b\u0438\u043c\u0438\u0442 \u0432 N \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445\u00a0<strong>\u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u0435\u043d<\/strong>\u00a0\u0438\u0437 EB. \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u0435\u0432\u0435\u043d\u0442\u0438\u0432\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c 1 \u0438\u043d\u0441\u0442\u0430\u043d\u0441, \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0434\u043d\u043e\u043c\u043e\u043c\u0435\u043d\u0442\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u043d\u0430 1 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0432 EB. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 Auto Scaling Group \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#171;<em>Instance maintenance policy<\/em>&#187; \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0<strong><em>Launch before terminating:<\/em><\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bb2\/952\/909\/bb29529091686a43ff2012bd4a7f6d56.png\" alt=\"pic 8. ASG Instance maintenance policy (example for 2 instances)  \" title=\"pic 8. ASG Instance maintenance policy (example for 2 instances)  \" width=\"714\" height=\"747\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bb2\/952\/909\/bb29529091686a43ff2012bd4a7f6d56.png\"\/><\/p>\n<div><figcaption>pic 8. ASG Instance maintenance policy (example for 2 instances)  <\/figcaption><\/div>\n<\/figure>\n<h3>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a, \u0435\u0441\u043b\u0438 \u043c\u044b \u0446\u0435\u043b\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.management\/stop-service?view=powershell-7.4\" rel=\"noopener noreferrer nofollow\">Stop-Service<\/a>)<\/p>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043d\u0430\u0448\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 &#8212; \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0440\u0430\u0432\u043d\u044b\u043c 2, \u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b CPU:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ee3\/709\/cd2\/ee3709cd28eb24d9383bde01ef3c05fd.png\" alt=\"pic 9. Demo configuration  \" title=\"pic 9. Demo configuration  \" width=\"734\" height=\"614\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ee3\/709\/cd2\/ee3709cd28eb24d9383bde01ef3c05fd.png\"\/><\/p>\n<div><figcaption>pic 9. Demo configuration  <\/figcaption><\/div>\n<\/figure>\n<blockquote>\n<p>C\u0442\u043e\u0438\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c, \u0447\u0442\u043e\u00a0\u0432\u00a0\u043d\u0430\u0448\u0435\u043c \u043a\u0435\u0439\u0441\u0435 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u00a0<a href=\"https:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/using-features.CNAMESwap.html\" rel=\"noopener noreferrer nofollow\">Blue\/Green Deployment<\/a>, \u043d\u043e\u00a0\u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u00a0\u0440\u0430\u043c\u043a\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<\/blockquote>\n<p>\u0412\u0438\u0434\u0438\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u044b:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d66\/b90\/292\/d66b90292aa6438541008b059430b12f.png\" alt=\"pic 10. Running instances  \" title=\"pic 10. Running instances  \" width=\"977\" height=\"198\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d66\/b90\/292\/d66b90292aa6438541008b059430b12f.png\"\/><\/p>\n<div><figcaption>pic 10. Running instances  <\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043d\u0438\u0445: <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/088\/48f\/cd4\/08848fcd4781ffd73efca48aeb25eaac.png\" alt=\"pic 11. Stopping the service  \" title=\"pic 11. Stopping the service  \" width=\"699\" height=\"249\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/088\/48f\/cd4\/08848fcd4781ffd73efca48aeb25eaac.png\"\/><\/p>\n<div><figcaption>pic 11. Stopping the service  <\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u043e\u0434\u043d\u043e\u0439 \u043c\u0438\u043d\u0443\u0442\u044b (\u043f\u043e \u043d\u0430\u0448\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c TargetGroups) \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fce\/8ce\/5e7\/fce8ce5e79b0286ee0deb46f78c9c274.png\" alt=\"pic 12. Severe Status  \" title=\"pic 12. Severe Status  \" width=\"957\" height=\"241\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fce\/8ce\/5e7\/fce8ce5e79b0286ee0deb46f78c9c274.png\"\/><\/p>\n<div><figcaption>pic 12. Severe Status  <\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u043d\u0441\u0442\u0430\u043d\u0441 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0448\u0435\u043b HealthCheck \u0438 \u0432 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0444\u0438\u043a \u0438\u0434\u0435\u0442 \u043d\u0430 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u0438\u043d\u0441\u0442\u0430\u043d\u0441.<\/p>\n<p>\u0418 \u0432 \u0442\u043e\u0436\u0435 \u0432\u0440\u0435\u043c\u044f (\u043a\u0430\u043a \u043c\u044b \u043f\u043e\u043c\u043d\u0438\u043c, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 20 \u0441\u0435\u043a\u0443\u043d\u0434) \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430, \u0434\u0430\u0436\u0435 \u043f\u043e\u043a\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043d\u0435 \u0443\u0434\u0430\u043b\u0451\u043d! \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c 3 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 (\u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u043e 2):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/357\/e55\/916\/357e55916892077b5bb3e8df5ae5c294.png\" alt=\"pic 13. 3 Instances  \" title=\"pic 13. 3 Instances  \" width=\"838\" height=\"290\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/357\/e55\/916\/357e55916892077b5bb3e8df5ae5c294.png\"\/><\/p>\n<div><figcaption>pic 13. 3 Instances  <\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 \u043d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043c\u0430\u0448\u0438\u043d.  <\/p>\n<p>\u0427\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0438 \u0432 EB Envorinment Events:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/296\/caa\/850\/296caa850db443aca18f2a57f4b013a5.png\" alt=\"pic 14. Final EB Envorinment Events  \" title=\"pic 14. Final EB Envorinment Events  \" width=\"1051\" height=\"70\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/296\/caa\/850\/296caa850db443aca18f2a57f4b013a5.png\"\/><\/p>\n<div><figcaption>pic 14. Final EB Envorinment Events  <\/figcaption><\/div>\n<\/figure>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451, \u043d\u0430\u0434\u0435\u0435\u043c\u0441\u044f \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0435\u0439\u0441\u0430 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b\u043e \u0432\u0430\u043c \u043d\u0435\u043c\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0432\u044b \u0443\u0437\u043d\u0430\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Elastic Beanstalk \u0432 AWS.<\/p>\n<hr\/>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/790892\/\"> https:\/\/habr.com\/ru\/articles\/790892\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u0421\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u044f\u044f \u0441\u0442\u0430\u0442\u044c\u044f, \u043a\u0430\u043a \u0432\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Elastic Beanstalk, \u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e &#8212; \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 AWS \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 TagretGroup \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0439.  <\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 Elastic Beanstalk<\/h3>\n<figure class=\"full-width\">\n<div><figcaption>pic 0. Elastic Beans  <\/figcaption><\/div>\n<\/figure>\n<p>Elastic Beanstalk \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0443\u044e \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435. EB \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b EC2 (\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b), \u0433\u0440\u0443\u043f\u043f\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043e\u0431\u044a\u0435\u043a\u0442\u044b S3 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 RDS, \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 Elastic Load Balancing \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u0430\u0442\u0440\u0430\u0442\u0430\u043c\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0443\u0441\u0438\u043b\u0438\u0439 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 Elastic Beanstalk \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (<strong>Application<\/strong>) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043b\u0443\u0436\u0438\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>\u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 (<strong>Environment<\/strong>) \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 AWS \u0438 \u0441\u043b\u0443\u0436\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0440\u043e\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0438\u043b\u0438 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ol>\n<p>\u0420\u0435\u0441\u0443\u0440\u0441\u044b, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/concepts.html\" rel=\"noopener noreferrer nofollow\"><strong>EC2<\/strong><\/a>\u00a0(<em>Elastic Compute Cloud<\/em>) &#8212; \u044d\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0430\u0440\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 AWS \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.aws.amazon.com\/elasticloadbalancing\/latest\/application\/load-balancer-target-groups.html\" rel=\"noopener noreferrer nofollow\"><strong>Target Group<\/strong><\/a>\u00a0&#8212; \u044d\u0442\u043e \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0432 AWS \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u043e\u043c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. Target Group \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0443\u0434\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u0442\u0440\u0430\u0444\u0438\u043a, \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 (<em>Load Balancer<\/em>). \u041a\u0430\u0436\u0434\u0430\u044f Target Group \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 EC2 \u043b\u0438\u0431\u043e \u043b\u044f\u043c\u0431\u0434\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.aws.amazon.com\/autoscaling\/ec2\/userguide\/auto-scaling-groups.html\" rel=\"noopener noreferrer nofollow\"><strong>Auto Scaling Groups<\/strong><\/a>\u00a0\u0434\u0430\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 EC2 \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438\/\u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f EB, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0442\u0435\u043c\u0435 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<h3>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/h3>\n<figure class=\"full-width\">\n<div><figcaption>pic 1. EB Environment Events   <\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435\u00a0<a href=\"https:\/\/aws.amazon.com\/ec2\/instance-types\/c5\/?nc1=h_ls\" rel=\"noopener noreferrer nofollow\">c5.xlarge<\/a>\u00a0\u0438 \u0432\u0441\u0435 status checks \u043e\u0442 AWS \u0432\u044b\u0434\u0430\u0432\u0430\u043b\u0438 &#171;<em>Success<\/em>&#171;, \u043c\u0430\u0448\u0438\u043d\u0430 \u0431\u044b\u043b\u0430 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 &#171;<em>Running<\/em>&#171;, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u043b\u043e. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043b\u043e\u0433\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u0440\u044b\u043b\u0430\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0435\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/iis\/\" rel=\"noopener noreferrer nofollow\">IIS<\/a>\u00a0(\u044d\u0442\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f &#8212; \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/iis\/configuration\/system.applicationhost\/applicationpools\/add\/recycling\/periodicrestart\/#configuration\" rel=\"noopener noreferrer nofollow\">\u043a\u0430\u0436\u0434\u044b\u0435 29 \u0447\u0430\u0441\u043e\u0432<\/a>, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e).<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 4 (!) \u043c\u0438\u043d\u0443\u0442\u044b. \u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f 4 \u043c\u0438\u043d\u0443\u0442\u044b \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u044b \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430\u00a0<a href=\"https:\/\/newrelic.com\/\" rel=\"noopener noreferrer nofollow\">NewRelic<\/a>. \u0412\u0441\u0451 \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0438\u0437 \u0435\u0433\u043e \u043b\u043e\u0433\u043e\u0432 &#8212; \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u043b \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0444\u0430\u043a\u0442\u044b \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0442\u043a\u043b\u0438\u043a\u0430 \u0438 \u043f\u0440. \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0444\u0438\u0447\u0438 ElasticBeanstalk \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0418 \u0442\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u044b\u0441\u043b\u0438 &#8212; \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u044b, \u043d\u043e \u0438 \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0447\u0438\u0441\u043b\u043e, \u043b\u0438\u0431\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c \u043f\u0440\u0438 \u043c\u0430\u043b\u043e\u0439.<\/p>\n<h3>Elastic Beanstalk<\/h3>\n<p>EB \u043d\u0435 \u0437\u0430\u0442\u043e\u0447\u0435\u043d \u043f\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0430 \u0441 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u043e\u043c \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u0441\u044d\u0442\u0430\u043f:<\/p>\n<ul>\n<li>\n<p>2x c5.large (c5.large \u0441\u0442\u043e\u0438\u0442\u00a0<a href=\"https:\/\/aws.amazon.com\/ec2\/pricing\/on-demand\/\" rel=\"noopener noreferrer nofollow\">\u0440\u043e\u0432\u043d\u043e \u0432 2 \u0440\u0430\u0437\u0430 \u0434\u0435\u0448\u0435\u0432\u043b\u0435<\/a>, \u0447\u0435\u043c c5.xlarge)<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 5 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 >80%, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u043d\u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0441<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 5 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 &lt;40%, \u043c\u044b \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u043d\u0441\u0442\u0430\u043d\u0441<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>pic 2. configuration  <\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">Resources:   AWSEBAutoScalingGroup:     Type: \"AWS::AutoScaling::AutoScalingGroup\"     Properties:       MinSize: 2       MaxSize: 3          AWSEBCloudwatchAlarmHigh:     Type: \"AWS::CloudWatch::Alarm\"     Properties:       EvaluationPeriods: 1        MetricName: CPUUtilization       Namespace: AWS\/EC2       Period: 300       Statistic: Average       ComparisonOperator: GreaterThanOrEqualToThreshold       Threshold: 80       Unit: Percent       AlarmActions:         - Ref: \"AWSEBAutoScalingScaleUpPolicy\"            AWSEBCloudwatchAlarmLow:     Type: \"AWS::CloudWatch::Alarm\"     Properties:       EvaluationPeriods: 1       MetricName: CPUUtilization       Namespace: AWS\/EC2       Period: 300       Statistic: Average       ComparisonOperator: LessThanOrEqualToThreshold       Threshold: 40       Unit: Percent       AlarmActions:         - Ref: \"AWSEBAutoScalingScaleDownPolicy\"            AWSEBAutoScalingScaleUpPolicy:     Type: \"AWS::AutoScaling::ScalingPolicy\"     Properties:       AdjustmentType: ChangeInCapacity       AutoScalingGroupName:         Ref: \"AWSEBAutoScalingGroup\"       Cooldown: 360       ScalingAdjustment: 1<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043e &#8212; \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e AWS \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u0441\u0435\u00a0<a href=\"https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/monitoring-system-instance-status-check.html\" rel=\"noopener noreferrer nofollow\"><em>Status Check<\/em><\/a>\u00a0\u043d\u0430 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442, \u0442\u043e \u043d\u0430 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0444\u0438\u043a. \u0427\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0435\u0439\u0441\u0430 &#8212; \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u044d\u0442\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c \u043d\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 HealthCheck,\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/aspnet\/core\/host-and-deploy\/health-checks?view=aspnetcore-8.0\" rel=\"noopener noreferrer nofollow\">\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 .NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438<\/a>.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c!<\/p>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0414\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f\u00a0<strong>Environment ID<\/strong>\u00a0\u0438 \u0432\u043e\u0442 \u044d\u0442\u0438 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 \u0432 \u0441\u0430\u0439\u0434\u0431\u0430\u0440\u0435 EC2:<\/p>\n<figure class=\"\">\n<div><figcaption>pic 3. EC2 Sidebar  <\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0439\u0434\u0435\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443:<\/p>\n<h3>1) Target Groups<\/h3>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c\u0438 uptime&#8217;\u0430 \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e TG.<br \/>\u0414\u043b\u044f \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 unhealthy \u043c\u0430\u0448\u0438\u043d\u044b \u0447\u0435\u0440\u0435\u0437 1 \u043c\u0438\u043d\u0443\u0442\u0443:<\/p>\n<p>3 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a\u0430\u0436\u0434\u044b\u0435 15 \u0441\u0435\u043a\u0443\u043d\u0434 + \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u044b (5 \u0441\u0435\u043a) = 1 \u043c\u0438\u043d\u0443\u0442\u0430<\/p>\n<figure class=\"full-width\">\n<div><figcaption>pic 4. Tagret Group health check settings  <\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435\u00a0<em>Attributes\u00a0<\/em>\u0435\u0441\u0442\u044c \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<em>\u00a0&#8212;\u00a0<\/em><strong>Deregistration delay.\u00a0<\/strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u043d\u0441\u0430\u043dc \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043f\u043e \/hc, \u0442\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0437\u0430 \u0432\u0440\u0435\u043c\u044f, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0432 \u044d\u0442\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435:  <\/p>\n<figure class=\"full-width\">\n<div><figcaption>pic 5. TG Deregistration Delay  <\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">Resources:   AWSEBV2LoadBalancerTargetGroup:     Type: \"AWS::ElasticLoadBalancingV2::TargetGroup\"     Properties:       HealthCheckIntervalSeconds: 15       HealthCheckPath: \/hc       HealthCheckProtocol: HTTP       HealthCheckTimeoutSeconds: 5       HealthyThresholdCount: 5       UnhealthyThresholdCount: 3       TargetGroupAttributes:         - Key: deregistration_delay.timeout_seconds           Value: '20'<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>2) Auto Scaling Groups<\/h3>\n<h4>2.1 Enable HealthChecks &amp; Set grace period<\/h4>\n<p>\u0421\u0430\u043c\u044b\u0439 \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0441\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u0448\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>pic. 6  <\/figcaption><\/div>\n<\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e ELB, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 &#171;<em>Turn on Elastic Load Balancing health checks<\/em>&#187; \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u00a0<a href=\"https:\/\/docs.aws.amazon.com\/autoscaling\/ec2\/userguide\/health-check-grace-period.html\" rel=\"noopener noreferrer nofollow\"><em>Health check grace period<\/em><\/a>.<\/p>\n<p><em>Health check grace period<\/em>\u00a0&#8212; \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e AWS \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 (\u0438\u043b\u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445) \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445\u00a0<a href=\"https:\/\/docs.aws.amazon.com\/autoscaling\/ec2\/userguide\/auto-scaling-groups.html\" rel=\"noopener noreferrer nofollow\">Auto Scaling Group<\/a>, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 health check.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0441\u0432\u043e\u0451 \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0435\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0415\u0441\u043b\u0438 \u0431\u044b AWS \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043b\u0438 \u043e\u043d\u043e \u043a\u0430\u043a \u043d\u0430\u0434\u043e, \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0438\u0434\u0435\u043b, \u0447\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0442\u0430\u043a (\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0441\u0442\u043e \u0435\u0449\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0440\u0435\u043c\u044f, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430), \u0442\u043e AWS \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u043b \u0431\u044b \u0435\u0433\u043e \u043a\u0430\u043a unhealthy \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>pic. 7  <\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0434\u0431\u043e\u0440 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e grace period &#8212; \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f. \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u0440\u0438\u043b\u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e\u00a0<strong>\u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c<\/strong>\u00a0\u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0443\u0436\u043d\u043e \u043d\u043e\u0432\u043e\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u043d\u0430\u0447\u0430\u043b\u043e \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c 200-\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u0442\u043e \u043c\u0435\u043d\u0435\u0435 8 \u043c\u0438\u043d\u0443\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0441 \u0437\u0430\u043f\u0430\u0441\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 500 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u0430\u043a\u0442\u043e\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f &#8212; \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0411\u0414 \u0438\u043b\u0438 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c grace period \u0432\u0440\u0443\u0447\u043d\u0443\u044e<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">Resources:   AWSEBAutoScalingGroup:     Type: \"AWS::AutoScaling::AutoScalingGroup\"     Properties:       HealthCheckType: ELB       HealthCheckGracePeriod: 500<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h4>2.2 Instance maintenance policy<\/h4>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c ELB \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c \u043b\u0438\u043c\u0438\u0442 \u0432 N \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445\u00a0<strong>\u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u0435\u043d<\/strong>\u00a0\u0438\u0437 EB. \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u0435\u0432\u0435\u043d\u0442\u0438\u0432\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c 1 \u0438\u043d\u0441\u0442\u0430\u043d\u0441, \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0434\u043d\u043e\u043c\u043e\u043c\u0435\u043d\u0442\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u043d\u0430 1 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0432 EB. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 Auto Scaling Group \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#171;<em>Instance maintenance policy<\/em>&#187; \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0<strong><em>Launch before terminating:<\/em><\/strong><\/p>\n<figure class=\"full-width\">\n<div><figcaption>pic 8. ASG Instance maintenance policy (example for 2 instances)  <\/figcaption><\/div>\n<\/figure>\n<h3>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a, \u0435\u0441\u043b\u0438 \u043c\u044b \u0446\u0435\u043b\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.management\/stop-service?view=powershell-7.4\" rel=\"noopener noreferrer nofollow\">Stop-Service<\/a>)<\/p>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043d\u0430\u0448\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 &#8212; \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0440\u0430\u0432\u043d\u044b\u043c 2, \u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b CPU:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>pic 9. Demo configuration  <\/figcaption><\/div>\n<\/figure>\n<blockquote>\n<p>C\u0442\u043e\u0438\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c, \u0447\u0442\u043e\u00a0\u0432\u00a0\u043d\u0430\u0448\u0435\u043c \u043a\u0435\u0439\u0441\u0435 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u00a0<a href=\"https:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/using-features.CNAMESwap.html\" rel=\"noopener noreferrer nofollow\">Blue\/Green Deployment<\/a>, \u043d\u043e\u00a0\u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u00a0\u0440\u0430\u043c\u043a\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<\/blockquote>\n<p>\u0412\u0438\u0434\u0438\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u044b:  <\/p>\n<figure class=\"full-width\">\n<div><figcaption>pic 10. Running instances  <\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043d\u0438\u0445: <\/p>\n<figure class=\"full-width\">\n<div><figcaption>pic 11. Stopping the service  <\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u043e\u0434\u043d\u043e\u0439 \u043c\u0438\u043d\u0443\u0442\u044b (\u043f\u043e \u043d\u0430\u0448\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c TargetGroups) \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>pic 12. Severe Status  <\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u043d\u0441\u0442\u0430\u043d\u0441 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0448\u0435\u043b HealthCheck \u0438 \u0432 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0444\u0438\u043a \u0438\u0434\u0435\u0442 \u043d\u0430 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u0438\u043d\u0441\u0442\u0430\u043d\u0441.<\/p>\n<p>\u0418 \u0432 \u0442\u043e\u0436\u0435 \u0432\u0440\u0435\u043c\u044f (\u043a\u0430\u043a \u043c\u044b \u043f\u043e\u043c\u043d\u0438\u043c, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 20 \u0441\u0435\u043a\u0443\u043d\u0434) \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430, \u0434\u0430\u0436\u0435 \u043f\u043e\u043a\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043d\u0435 \u0443\u0434\u0430\u043b\u0451\u043d! \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c 3 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 (\u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u043e 2):<\/p>\n<figure class=\"full-width\">\n<div><figcaption>pic 13. 3 Instances  <\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 \u043d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043c\u0430\u0448\u0438\u043d.  <\/p>\n<p>\u0427\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0438 \u0432 EB Envorinment Events:  <\/p>\n<figure class=\"full-width\">\n<div><figcaption>pic 14. Final EB Envorinment Events  <\/figcaption><\/div>\n<\/figure>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451, \u043d\u0430\u0434\u0435\u0435\u043c\u0441\u044f \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0435\u0439\u0441\u0430 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b\u043e \u0432\u0430\u043c \u043d\u0435\u043c\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0432\u044b \u0443\u0437\u043d\u0430\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Elastic Beanstalk \u0432 AWS.<\/p>\n<hr\/>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/790892\/\"> https:\/\/habr.com\/ru\/articles\/790892\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-367102","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/367102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=367102"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/367102\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=367102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=367102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=367102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}