Home » Posts tagged "reserved"

EC2 提供短期 RI 選項...

Amazon EC2 推出了短期 RI 選項:「Amazon EC2 now offers On-Demand Capacity Reservations」。

最早的 RI 設計包括了「保證一定開的起來」與「折扣」,但後來 AWS 大概是發現大家都是要「折扣」而不是保證開的起來,所以就開放了只有 discount 的部份。把原來有保證一定開的起來的部份變成 Zonal Reserved Instances。

不過 Zonal Reserved Instances 最少要一年 (有對應的折扣),這次規劃的 On-Demand Capacity Reservations 可以隨時取消,但是就沒折扣了:

Previously in order to achieve a capacity reservation, customers had to leverage Zonal Reserved Instances and commit to that capacity for a minimum of one year. Now with On-Demand Capacity Reservations, customers can reserve the exact capacity they need, in the location they need, and can keep it only for as long as they need it.

不過費用計算上會組合已經買的 Regional RI,如果沒被用掉的話還是可以將對應的折扣拿進來用:

If you have Regional RI discounts, they will automatically apply to any matching Capacity Reservation. This gives you the flexibility to selectively add capacity reservations and still get the Regional RI discounts for that usage.

算是對需要「保證開的起來」的單位提供短期的彈性,實際上後面應該是去 spot instance 那邊踢一些機器出來?XD

AWS 推出 EC2 Fleet:直接混搭標準 EC2、Spot、RI 的計算

AWS 將本來 EC2Spot Fleet 加上了 EC2 Fleet,計算的公式從本來只有 Spot Instace,變成把標準 EC2 Instance 與 RI 的計算全部都納進來:「EC2 Fleet – Manage Thousands of On-Demand and Spot Instances with One Request」。

Today we are extending and generalizing the set-it-and-forget-it model that we pioneered in Spot Fleet with EC2 Fleet, a new building block that gives you the ability to create fleets that are composed of a combination of EC2 On-Demand, Reserved, and Spot Instances with a single API call.

不過目前有些服務還沒整,主要是跟 auto scaling 有關的部份,這部份應該是一次上一大包:

We plan to connect EC2 Fleet and EC2 Auto Scaling groups. This will let you create a single fleet that mixed instance types and Spot, Reserved and On-Demand, while also taking advantage of EC2 Auto Scaling features such as health checks and lifecycle hooks. This integration will also bring EC2 Fleet functionality to services such as Amazon ECS, Amazon EKS, and AWS Batch that build on and make use of EC2 Auto Scaling for fleet management.

整完以後對於要省成本就更簡單了...

一路從 MySQL 5.5 升級到 MySQL 8.0 的故事...

在「Migrating to MySQL 8.0 without breaking old application」這邊看到這個有趣的故事 XD 這是作者的應用程式 DrupalMySQL 5.5 一路升級到 8.0 的過程記錄...

真正的問題發生在 5.7 到 8.0:

原因是 Drupal 用到關鍵字了:

In fact, this old Drupal, uses a table name that is now part of the reserved keywords. It’s always advised to verify what are the new keywords reserved for MySQL itself. New features can also mean new keywords sometimes.

修正後就好了:

話說依照「File:Drupal release timeline.png」這邊的資訊,Drupal 6.2 也十年左右了?應該是 PDO 剛開始要推廣的年代,不知道他跑哪個版本的 PHP...

另外 MySQL 的升級意外的順利?雖然是一步一步升,但沒遇到什麼大問題...

AWS 讓你可以禁止 RI 跨帳號計算了...

現在 AWS 讓你可以設定,是否允許 Reserved Instance (RI) 跨帳號使用:「Customize your organization’s AWS credit and Reserved Instance (RI) discount sharing using new billing preferences」。

以往是優先用在自己帳號,但如果有剩的話可以挪去其他帳號用。這樣雖然比較省錢,但有時候會造成帳務的「困擾」:

Historically, AWS has maximized customer savings by applying credits and RI discounts first to the account that owned the credit or RI lease and then distributing the remainder, if any, to qualifying usage incurred by accounts in the same organization. While this approach had the potential of lowering the overall bill, customers were unable to control if, and how, discounts were applied across organizational lines.

現在則是可以關掉:

To provide greater flexibility, customers can now disable AWS credit sharing across all accounts in their organization. This ensures that only the account that owns a credit, or has previously redeemed a credit, receives the associated benefit.

也可以分開設定:

You can also designate a set of accounts for which RI discount sharing is disabled, while continuing to share RI discounts among the rest of the accounts in your organization.

這樣雖然會比較貴,但這其實反應到某些組織文化上的問題啦...

Amazon EC2 的 CRI 支援一年版本了...

Amazon EC2 的 CRI (Convertible Reserved Instance) 支援一年的合約了:「EC2 Convertible Reserved Instance Update – New 1-Year CRI, Merges & Splits」,這樣彈性再多了一些:

Today we are introducing Convertible RIs with a 1-year term, complementing the existing 3-year term.

不過 CRI 主要是用在需要換 family type 的情境下,如果是已知 family type (像是一般性的 worker 會選 C4 或是剛推出的 C5) 那麼就直接選擇 Regional RI 就好...

基本上就是讓財務操作上多個選擇 :o

Amazon RDS 的 RI 也支援彈性計價了

AWS 宣佈 RDS 的 RI 也支援彈性計價了:「Amazon RDS Reserved Instances Offer Instance Size Flexibility」。

也就是說跟 EC2 的 RI 方式切齊,買 db.m4.2xlarge 的 RI 後,可以用在兩台 db.m4.xlarge 上:

For example, let’s say you purchased a db.m4.2xlarge MySQL RI in US East (N. Virginia). The discounted rate of this RI can automatically apply to 2 db.m4.xlarge MySQL instances without you needing to do anything.

包括了相當多種類的 RDS,主要是沒有 license fee 的類型都包括在內了:

Amazon RDS Reserved Instance size flexibility is offered in all regions for the MySQL, MariaDB, PostgreSQL, and Amazon Aurora database engines, as well as the “bring your own license” (BYOL) edition of the Oracle database engine. To learn more about flexible RIs, please visit the Amazon RDS Reserved Instances Page.

但不包括要另外收 license fee 的 SQL Server 與 Oracle LI edition:

Size flexibility does not apply to Microsoft SQL Server and the License Included (LI) edition of Oracle.

透過 AWS Budgets 管控 Reserved Instance 的使用率

現在可以透過 AWS Budgets 來看到 Reserved Instance 的使用率了:「Monitor your Reserved Instance utilization by receiving alerts via AWS Budgets」。

Starting today, customers can now monitor and receive alerts when their Reserved Instance (“RI”) utilization falls below the threshold they define.

算是個開頭,不過我更想請 AWS 分析有哪些機器是長年開著沒有 discount 的... 或者像是 GCP 那樣自動算 :o

Amazon EC2 的 RI 降價

這次 Amazon EC2 主要降的是 Reserved Instances 的部份:「EC2 Price Reductions – Reserved Instances & M4 Instances」。

  • New No Upfront Payment Option for 3 Year Standard RIs
  • Lower Prices for No Upfront Reserved Instances
  • Lower Prices for Convertible Reserved Instances

另外一般性的降價以 m4 為主:「Lower Prices for M4 Instances」,如果拿 t2.large 跟 m4.large 比較,us-west-2 (Oregon) 的價錢就很微妙了:

t2.large2Variable8EBS Only$0.094 per Hour
m4.large26.58EBS Only$0.1 per Hour

如果是 ap-northeast-1 (Tokyo) 的話是:

t2.large2Variable8EBS Only$0.128 per Hour
m4.large26.58EBS Only$0.129 per Hour

雖然 AWS 官方的說法是這樣 (取自「AWS t2 burst mode ECU equivalence」),表示 t2 系列有他特別可以應用的地方,但還是有哪邊覺得很微妙...:

Google Cloud Platform 也開始玩 Reserved Instances 的想法了 (Committed use discounts)

看到 Google Cloud PlatformGoogle Cloud Engine 也開始提供 RI 的想法了:「Committed use discounts」。

本來就有 Sustained use discounts,當你用到一定的量時就會自動折扣,不需要人工介入,不過對於 7x24 開機的 instance 來說,能得到的折扣還是比不上 AWS 的 RI。

這次 Committed use discounts 折扣的方式跟 Amazon EC2 類似,一樣是一年與三年。計價方式不同的原因是因為 GCE 提供 custom type,使用者可以自己選 vCPU 與 Memory,所以折扣的方式也是圍繞在這兩個選擇上規劃。

不過小台機器是不提供折扣的,這點就不像 AWS 上所有種類的機器都可以買 RI:

You can only use committed use discounts for predefined machine types and custom machine types. Small machine types, such as f1-micro and g1-small, are not eligible for committed use discounts.

目前是 beta:

This is a Beta release of Committed Use Discounts. This feature is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes.

AWS 提高 EC2 Reserved Instances 的彈性

AWS 提高了 EC2 Reserved Instances 的彈性:「New – Instance Size Flexibility for EC2 Reserved Instances」。

比較簡單的說 (但不是太精確),就是針對 family type 就可以了,同一個 family type 會依照比例系統自動計算。

舉個例子來說,買 c4.8xlarge 的 RI 可以被計算在兩台 c4.4xlarge 上。而買 c4.4xlarge 的 RI 後,c4.8xlarge 的機器可以有一半透過 c4.4xlarge 計算,另外一半依照原價算。就不需要自己調來調去了...

整個新的計算方式回溯到 2017/03/01 生效。

Archives