{"id":1621,"date":"2023-03-25T20:59:18","date_gmt":"2023-03-25T12:59:18","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1621"},"modified":"2023-04-27T21:14:56","modified_gmt":"2023-04-27T13:14:56","slug":"aws-ec2-rds-ri-reserved-instance-payment-optimization","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/25\/aws-ec2-rds-ri-reserved-instance-payment-optimization\/","title":{"rendered":"AWS EC2\/RDS RI(\u9884\u7559\u5b9e\u4f8b) \u4ed8\u8d39\u4f18\u5316"},"content":{"rendered":"<p>AWS EC2 \u9884\u7559\u5b9e\u4f8b(<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/docs.aws.amazon.com\/zh_cn\/AWSEC2\/latest\/UserGuide\/ec2-reserved-instances.html\" title=\"Reserved Instance\">Reserved Instance<\/a>, \u4e0b\u6587\u7edf\u4e00\u7b80\u79f0 RI) \u7b80\u5355\u6765\u8bf4\u5c31\u662f\u865a\u62df\u673a\u5305\u5e74\uff0c\u4e00\u6b21\u6027\u7f34\u7eb3\u4e00\u5e74\u7684\u8d39\u7528\u6298\u6263\u975e\u5e38\u8bf1\u4eba\uff0c\u6bd4\u6309\u9700\u542f\u52a8(\u4e5f\u5c31\u662f\u6309\u5c0f\u65f6\u8ba1\u8d39) \u4fbf\u5b9c\u975e\u5e38\u591a\uff0c\u4f46\u5982\u4f55\u77e5\u9053\u8be5\u4e70\u591a\u5c11\u4e2a RI \u5462? \u5c24\u5176\u516c\u53f8\u5f00\u59cb\u589e\u957f\uff0c\u6570\u636e\u5f00\u53d1\u4eba\u5458\u7ecf\u5e38\u4f1a\u6309\u9700\u542f\u52a8\u4e00\u4e9b\u8ba1\u7b97\u96c6\u7fa4\u7684\u60c5\u51b5\u4e0b\uff0c\u5982\u4f55\u4f18\u5316\u8d2d\u4e70\u7b56\u7565\u8fbe\u5230\u8282\u7701\u5f00\u652f\u7684\u76ee\u7684\uff1f<\/p>\n<p>\u57fa\u4e8e\u4f7f\u7528\u5386\u53f2\u4f18\u5316 RI \u8d2d\u4e70\u7684\u65b9\u6848\uff1a\u6839\u636e\u4e00\u6bb5\u65f6\u95f4\u7684\u4f7f\u7528\u5386\u53f2\uff0c\u540e\u7eed\u53bb\u8d2d\u4e70 RI<\/p>\n<p><!-- more --><\/p>\n<h2>AWS \u73b0\u72b6<\/h2>\n<ul>\n<li>\u6bcf\u4e2a\u5b9e\u4f8b\u6309\u5c0f\u65f6\u8ba1\u8d39\uff0c\u4e0d\u8db3\u4e00\u5c0f\u65f6\u6309\u7167\u4e00\u5c0f\u65f6\u8ba1\u8d39 (\u6ce8\u610f\u662f\u6bcf\u4e2a\u5b9e\u4f8b\uff0c\u6bd4\u5982<code>t2.micro<\/code>\u7c7b\u578b\u5b9e\u4f8b\u5728\u4e00\u4e2a\u5c0f\u65f6\u5185\u542f\u52a8\u4e24\u4e2a(\u542f\u52a8\u4e00\u4e2a\uff0c<code>terminate<\/code>\u540e\u518d\u542f\u52a8\u4e00\u4e2a\uff0c\u518d<code>terminate<\/code>\u8981\u7b97\u4e24\u4e2a\u5c0f\u65f6)<\/li>\n<li>\u6bcf\u4e2a\u542f\u52a8\u7684 EC2 \u5b9e\u4f8b\u90fd\u6709\u552f\u4e00\u7684\u4e00\u4e2aID: <code>instance id<\/code><\/li>\n<li>\u865a\u62df\u673a\u542f\u52a8&#8217;\u6162&#8217;\uff0c\u57fa\u672c\u4e0a\u542f\u52a8\u4e00\u4e2a\u8282\u70b9\u89811\u5206\u949f+<\/li>\n<li>\u6240\u6709\u7684 EC2 \u4fe1\u606f\u53ef\u4ee5\u901a\u8fc7 API \u5f88\u5bb9\u6613\u62ff\u5230<\/li>\n<li>RI \u9488\u5bf9\u7684\u662f\u5bf9\u5e94\u7684<code>AvailabilityZone<\/code>\u7684\u76f8\u5e94\u7c7b\u578b\uff0c\u6bd4\u5982\u5728<code>cn-north-1a<\/code>\u8d2d\u4e70\u7684<code>t2.micro RI<\/code>\u5bf9<code>cn-north-1b<\/code>\u7684<code>t2.micro<\/code>\u5b9e\u4f8b\u6ca1\u6709\u7528<\/li>\n<\/ul>\n<p>EC2\u6309\u9700\u5b9a\u4ef7\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/aws.amazon.com\/cn\/ec2\/pricing\/on-demand\/\">https:\/\/aws.amazon.com\/cn\/ec2\/pricing\/on-demand\/<\/a><\/p>\n<h2>\u5b98\u65b9\u8d26\u5355<\/h2>\n<p>\u53ef\u4ee5\u5728\u8d26\u6237\u4e2d\u8bbe\u7f6e\u5bfc\u51fa\u8d26\u5355\uff0c\u6307\u5b9a\u4e00\u4e2a<code>S3 bucket<\/code>\uff0c\u6bcf\u4e2a\u6708\u4f1a\u4ee5 csv \u6587\u4ef6\u7684\u65b9\u5f0f\u5bfc\u51fa\u8be6\u7ec6\u8d26\u5355\u3002\u4e5f\u53ef\u4ee5\u5728(<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/console.aws.amazon.com\/billing\/home?region=ap-southeast-1#\/bills\" title=\"\u8d26\u5355\u63a7\u5236\u53f0\">\u8d26\u5355\u63a7\u5236\u53f0<\/a>\u81ea\u884c\u4e0b\u8f7d\u3002\u4f46AWS\u8d26\u5355\u4e00\u4e2a\u6708\u624d\u51fa\u4e00\u6b21\uff0c\u4e0d\u80fd\u7b49\u5230<code>on demand<\/code>\u4ed8\u8d39\u4e86\u4e00\u4e2a\u6708\u624d\u60f3\u8d77\u4e70RI \u5f88\u4e0d\u5212\u7b97<\/p>\n<h2>\u8d2d\u4e70 RI<\/h2>\n<p>\u4ee5\u53ef\u7528\u533a<code>ap-southeast-1<\/code>\u4e3a\u4f8b\uff1a<\/p>\n<p>RI\u63a7\u5236\u53f0\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/ap-southeast-1.console.aws.amazon.com\/ec2\/v2\/home?region=ap-southeast-1#ReservedInstances:sort=desc:availabilityZone\">https:\/\/ap-southeast-1.console.aws.amazon.com\/ec2\/v2\/home?region=ap-southeast-1#ReservedInstances:sort=desc:availabilityZone<\/a><\/p>\n<h3>\u7edf\u8ba1\u9700\u8981\u7684EC2\u548cRDS\u89c4\u683c\u53ca\u6570\u91cf<\/h3>\n<p>\uff081\uff09EC2\u89c4\u683c\u53ca\u6570\u91cf<\/p>\n<ul>\n<li>m5.large * 12<\/li>\n<li>m5.xlarge * 3<\/li>\n<\/ul>\n<p>\uff082\uff09\u63d0\u4f9b\u7684\u7c7b\u522b<\/p>\n<ul>\n<li>\u53ef\u8f6c\u6362\uff1a\u5982<code>m5.large<\/code>\u53ef\u4ee5\u8f6c\u4e3a<code>t2.large<\/code><\/li>\n<li>\u6807\u51c6\uff1a\u4e0d\u53ef\u8f6c\u6362<\/li>\n<\/ul>\n<p>\uff083\uff09\u4ed8\u6b3e\u9009\u9879<\/p>\n<ul>\n<li>No Upfront: \u65e0\u8d39\u7528\u9884\u4ed8<\/li>\n<li>Partial Upfront: \u9884\u4ed8\u90e8\u5206\u8d39\u7528<\/li>\n<li>All Upfront: \u9884\u4ed8\u5168\u8d39<\/li>\n<\/ul>\n<p>\u4ef7\u683c\u76f8\u5dee\u4e0d\u5927\uff0c\u9009\u62e9<code>No Upfront<\/code>\u5373\u53ef<\/p>\n<h3>\u53ef\u7528\u533a<\/h3>\n<blockquote>\n<p>\u5343\u4e07\u522b\u641e\u9519<code>AvailabilityZone<\/code>\uff08\u53ef\u7528\u533a\uff09<\/p>\n<p>\u8d2d\u4e70\u7684RI\u53ef\u7528\u533a\u4e0e\u73b0\u6709EC2\u53ef\u7528\u533a\u4e0d\u4e00\u81f4\u5c06\u5bfc\u81f4\u4e0d\u80fd\u81ea\u52a8\u5173\u8054\uff0c\u8d2d\u4e70\u540e\u4e0d\u80fd\u53d6\u6d88\uff0c\u53ea\u80fd\u6302\u5728\u5e02\u573a\u4e0a\u51fa\u552e<\/p>\n<\/blockquote>\n<p>\u7531\u4e8e RI \u662f\u9488\u5bf9\u67d0\u4e2a<code>AvailabilityZone<\/code>\u7684\u67d0\u4e2a\u7c7b\u578b\u7684\u8282\u70b9\uff0c\u56e0\u6b64\u5c3d\u91cf\u4f7f\u7528\u5c11\u7c7b\u578b\u7684 EC2 \u8282\u70b9\u6709\u65f6\u53ef\u4ee5\u8282\u7701\u6210\u672c\u3002\u6bd4\u5982A\u7cfb\u7edf\u9700\u8981<code>c3.4xlarge<\/code>\u7c7b\u578b\u8282\u70b910\u53f0\uff0cB \u7cfb\u7edf\u9700\u898120\u53f0 <code>c3.2xlarge<\/code>\uff0c\u5982\u679c\u6709\u53ef\u80fd\uff0c\u662f\u4e0d\u662f\u53ef\u4ee5\u90fd\u7528\u4e00\u4e2a\u7c7b\u578b\u7684\u8282\u70b9\uff0c\u8d2d\u4e70\u540c\u6837\u7684 RI\uff0c\u7b49\u5230\u7cfb\u7edf resize\u4e86\u8fd8\u53ef\u4ee5\u7a7a\u4f59 RI \u7ed9\u5176\u4ed6\u7cfb\u7edf\u3002\u9488\u5bf9<code>AvailabilityZone<\/code>\uff0c\u5982\u679c\u4e0d\u9700\u8981\u9ad8\u53ef\u7528\uff0c\u5c3d\u91cf\u5728\u540c\u4e00\u4e2a<code>AvailabilityZone<\/code>\uff0c\u6bd4\u5982\u8ba1\u7b97\u5bc6\u96c6\u578b\u7684\u7cfb\u7edf<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AWS EC2 \u9884\u7559\u5b9e\u4f8b(Reserved Instance, \u4e0b\u6587\u7edf\u4e00\u7b80\u79f0 RI) \u7b80\u5355\u6765\u8bf4\u5c31\u662f\u865a\u62df\u673a\u5305\u5e74\uff0c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[90],"tags":[400,405,406],"class_list":["post-1621","post","type-post","status-publish","format-standard","hentry","category-cloud-devops","tag-aws","tag-ec2","tag-rds"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1621"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1621\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}