1. 程式人生 > >New – Auto Scaling for EC2 Spot Fleets

New – Auto Scaling for EC2 Spot Fleets

The EC2 Spot Fleet model (see Amazon EC2 Spot Fleet API – Manage Thousands of Spot Instances with one Request for more information) allows you to create a fleet of EC2 instances with a single request. You simply specify the fleet’s target capacity, enter a bid price per hour, and choose the instance types that you would like to have as part of your fleet.

Behind the scenes, AWS will maintain the desired target capacity (expressed in terms of instances or a vCPU count) by launching Spot instances that result in the best prices for you. Over time, as instances in the fleet are terminated due to rising prices, replacement instances will be launched using the specifications that result in the lowest price at that point in time.

New Auto Scaling
Today we are enhancing the Spot Fleet model with the addition of Auto Scaling. You can now arrange to scale your fleet up and down based on a Amazon CloudWatch metric. The metric can originate from an AWS service such as EC2, Amazon EC2 Container Service, or Amazon Simple Queue Service (SQS)

. Alternatively, your application can publish a custom metric and you can use it to drive the automated scaling. Either way, using these metrics to control the size of your fleet gives you very fine-grained control over application availability, performance, and cost even as conditions and loads change. Here are some ideas to get you started:

  • Containers – Scale container-based applications running on Amazon ECS using CPU or memory usage metrics.
  • Batch Jobs – Scale queue-driven batch jobs based on the number of messages in an SQS queue.
  • Spot Fleets – Scale a fleet based on Spot Fleet metrics such as MaxPercentCapacityAllocation.
  • Web Service – Scale web services based on measured response time and average requests per second.

You can set up Auto Scaling using the Spot Fleet Console, the AWS Command Line Interface (CLI), AWS CloudFormation, or by making API calls using one of the AWS SDKs.

I started by launching a fleet. I used the request type Request and maintain in order to be able to scale the fleet up and down:

My fleet was up and running within a minute or so:

Then (for illustrative purposes) I created an SQS queue, put some messages in it, and defined a CloudWatch alarm (AppQueueBackingUp) that would fire if there were 10 or more messages visible in the queue:

I also defined an alarm (AppQueueNearlyEmpty) that would fire if the queue was just about empty (2 messages or less).

Finally, I attached the alarms to the ScaleUp and ScaleDown policies for my fleet:

Before I started writing this post, I put 5 messages into the SQS queue. With the fleet launched and the scaling policies in place, I added 5 more, and then waited for the alarm to fire:

Then I checked in on my fleet, and saw that the capacity had been increased as expected. This was visible in the History tab (“New targetCapacity: 5”):

To wrap things up I purged all of the messages from my queue, watered my plants, and returned to find that my fleet had been scaled down as expected (“New targetCapacity: 2”):

Available Now
This new feature is available now and you can start using it today in all regions where Spot instances are supported.

Jeff;

相關推薦

NewAuto Scaling for EC2 Spot Fleets

The EC2 Spot Fleet model (see Amazon EC2 Spot Fleet API – Manage Thousands of Spot Instances with one Request for more information) allows you to

全新推出 – Auto Scaling for Amazon DynamoDB

Amazon DynamoDB 擁有十萬多的客戶,客戶身處各種行業,使用案例也各不相同。這些客戶依賴於 DynamoDB 在任何規模下都能提供的一致性能和覆蓋全球 16 個地理區域的服務網路。最近我們注意到一個趨勢,客戶正在使用 DynamoDB 來為他們的無伺服器應用程式提供支援。這是一個

New AWS Auto Scaling – Unified Scaling For Your Cloud Applications

I’ve been talking about scalability for servers and other cloud resources for a very long time! Back in 2006, I wrote “This is the new world of sc

New Amazon EC2 Spot pricing model: Simplified purchasing without bidding and fewer interruptions

Contributed by Deepthi Chelupati and Roshni Pary Amazon EC2 Spot Instances offer spare compute capacity in the AWS Cloud at steep discount

Amazon EC2 Auto Scaling FAQs

Q: What are the benefits of using Amazon EC2 Auto Scaling? Amazon EC2 Auto Scaling helps to maintain your Amazon EC2 instance avai

Amazon EC2 Auto Scaling Features

Predictive Scaling predicts future traffic, including regularly-occurring spikes, and provisions the right number of EC2 instances in advance of

Amazon EC2 Auto Scaling Pricing

Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So

新增 – EC2 Auto Scaling 的目標跟蹤策略

最近我介紹過 DynamoDB Auto Scaling,並演示了它如何使用多個 CloudWatch 警報來實現 DynamoDB 表的自動容量管理。此功能在後臺使用了一種更為通用的 Application Auto Scaling 模型,我們計劃以後逐漸在多項不同 AWS 服務中投入使用

Amazon EC2 Auto Scaling Getting Started

There are several ways to get started with Amazon EC2 Auto Scaling. This page provides resources that can help you manage and scale your EC2 fleet

Auto Scaling 彈性伸縮_自動擴縮Amazon EC2的容量

AWS Auto Scaling 可以監控您的應用程式並自動調整容量,以便以儘可能低的成本來保持穩定、可預測的效能。使用 AWS Auto Scaling,您可以在幾分鐘內為多項服務中的多個資源輕鬆設定應用程式擴充套件。該服務可以提供一個簡單而功能強大的使用者介面,讓您可以為 Amazon

Amazon EC2 Auto Scaling 常見問題

問:使用 Amazon EC2 Auto Scaling 有哪些好處? Amazon EC2 Auto Scaling 有助於維護 Amazon EC2 例項的可用性。不論您執行多少個 Amazon EC2 例項,都可以使用 Amazon EC2 Auto S

Auto updater for my side loaded UWP apps

tostring connect ict arm reference course devices setting ret 原文: Auto updater for my side loaded UWP apps As I described before, i have

彈性伸縮Auto Scaling產品全面升級,輕松應對業務負載變化

冗余 穩定性 阿裏 server 反饋 公鑰 一段時間 采集 總數 摘要:?彈性伸縮是阿裏雲上非常受歡迎的一個雲服務編排產品,它能夠根據用戶的策略定義和業務需求變化,動態調整彈性計算資源,在有效支撐業務負載變化的同時保持最合理經濟的基礎設施費用開支。基於廣大用戶的反饋和建議

論文研讀 “Liar, Liar Pants on Fire”:A New Benchmark Dataset for Fake News Detection

給十月畫個句號 最近上的很喜歡的一門課中,老師要求我們研讀一篇頂會論文並進行分享,好久沒能靜靜地坐下來寫一篇部落格了,接下來希望自己能夠多讀論文的同時把論文的思路以部落格的形式輸出~ 論文來源 “Liar, Liar Pants on Fire”:A New Benchmar

Python-auto-run for refbox-master user

# -*- coding:utf-8 -*- import time,os import keyboard import mouse  from  pynput.mouse import Button, Controller import time,subprocess m

JMeter: New XSL stylesheet for JMeter command line results report

JMeter has built-in ant integration, which allows us to run JMeter from command line. The result of running from command line is a JTL out

Nintendo has launched some exciting new hardware bundles for pre

Every year there are a host of new titles that enter the gaming sphere, with differing levels of success. Some newbies establish themselves amongst the cro

VWhy Google built a new search tool for data journalists

Why Google built a new search tool for data journalistsData journalism can deliver some of the most rewarding and valuable stories — but it can also be tim

I’ve got a new startup idea for you!

I’ve got a new startup idea for you!Hello there Human, I’ve got an exciting proposal for you. Given that you opened the article I will assume you are a sav