Skip to content

MINOR: Switch to use AWS spot instance to save 76% in cost - #5707

Closed
maxzheng wants to merge 2 commits into
apache:trunkfrom
maxzheng:minor-switch@trunk
Closed

MINOR: Switch to use AWS spot instance to save 76% in cost#5707
maxzheng wants to merge 2 commits into
apache:trunkfrom
maxzheng:minor-switch@trunk

Conversation

@maxzheng

Copy link
Copy Markdown
Contributor

Pricing for m3.xlarge: On-Demand is at $0.266. Reserved is at about $0.16 (40% discount). And Spot is at $0.0627 (76% discount relative to On-Demand, or 60% discount relative to Reserved). Insignificant fluctuation in the past 3 months.

Ran on branch builder and works as expected -- each worker is created using spot instances (https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1982/console)

This can be safely backported to 0.10.2 (tested using https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1983/)

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@ijuma
ijuma requested a review from cmccabe September 29, 2018 06:12
@maxzheng

maxzheng commented Oct 2, 2018

Copy link
Copy Markdown
Contributor Author

FYI Based on the 6 branches (12 workers per branch from 0.10.2 to trunk), that's 72 hosts running about ~11 hours per day, the cost for on-demand is about $6,300 per month. The spot instance price is at $1,500 per month, so we will save about $4,800 per month with this change.

CC @ewencp

@ewencp ewencp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall seems fine except for question re: spot pricing.

if there are no concerns there and re: overrides, happy to merge and cherry-pick back as far as needed. sounds like 0.10.2 is where we'd definitely want it, should we go any further back or is 0.10.2 enough?

Comment thread Vagrantfile Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see we can override this via env variable, but having it fixed in code as a default seems like a bad baseline. Are we just always overriding this value in practice anyway?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is not much use for the env as it is normally not used, so removing it in favor of a sane default based on instance type.

As for cherry-picking, as someone started testing 0.10.1, I think we can go back to there. There will be a merge conflict, but it's pretty straight forward / just due to Vagrant version change, which is the same version in 0.10.2 and that was tested to work.

@maxzheng
maxzheng force-pushed the minor-switch@trunk branch from bcf7353 to 80ffe22 Compare October 5, 2018 05:40

@ewencp ewencp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

ewencp pushed a commit that referenced this pull request Oct 5, 2018
Pricing for m3.xlarge: On-Demand is at $0.266. Reserved is at about $0.16 (40% discount). And Spot is at $0.0627 (76% discount relative to On-Demand, or 60% discount relative to Reserved). Insignificant fluctuation in the past 3 months.

Ran on branch builder and works as expected -- each worker is created using spot instances (https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1982/console)

This can be safely backported to 0.10.2 (tested using https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1983/)

Author: Max Zheng <maxzheng.os@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5707 from maxzheng/minor-switch@trunk

(cherry picked from commit 50ec829)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
ewencp pushed a commit that referenced this pull request Oct 5, 2018
Pricing for m3.xlarge: On-Demand is at $0.266. Reserved is at about $0.16 (40% discount). And Spot is at $0.0627 (76% discount relative to On-Demand, or 60% discount relative to Reserved). Insignificant fluctuation in the past 3 months.

Ran on branch builder and works as expected -- each worker is created using spot instances (https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1982/console)

This can be safely backported to 0.10.2 (tested using https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1983/)

Author: Max Zheng <maxzheng.os@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5707 from maxzheng/minor-switch@trunk

(cherry picked from commit 50ec829)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
ewencp pushed a commit that referenced this pull request Oct 5, 2018
Pricing for m3.xlarge: On-Demand is at $0.266. Reserved is at about $0.16 (40% discount). And Spot is at $0.0627 (76% discount relative to On-Demand, or 60% discount relative to Reserved). Insignificant fluctuation in the past 3 months.

Ran on branch builder and works as expected -- each worker is created using spot instances (https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1982/console)

This can be safely backported to 0.10.2 (tested using https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1983/)

Author: Max Zheng <maxzheng.os@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5707 from maxzheng/minor-switch@trunk

(cherry picked from commit 50ec829)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
ewencp pushed a commit that referenced this pull request Oct 5, 2018
Pricing for m3.xlarge: On-Demand is at $0.266. Reserved is at about $0.16 (40% discount). And Spot is at $0.0627 (76% discount relative to On-Demand, or 60% discount relative to Reserved). Insignificant fluctuation in the past 3 months.

Ran on branch builder and works as expected -- each worker is created using spot instances (https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1982/console)

This can be safely backported to 0.10.2 (tested using https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1983/)

Author: Max Zheng <maxzheng.os@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5707 from maxzheng/minor-switch@trunk

(cherry picked from commit 50ec829)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
@ewencp ewencp closed this in 50ec829 Oct 5, 2018
ewencp pushed a commit that referenced this pull request Oct 5, 2018
Pricing for m3.xlarge: On-Demand is at $0.266. Reserved is at about $0.16 (40% discount). And Spot is at $0.0627 (76% discount relative to On-Demand, or 60% discount relative to Reserved). Insignificant fluctuation in the past 3 months.

Ran on branch builder and works as expected -- each worker is created using spot instances (https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1982/console)

This can be safely backported to 0.10.2 (tested using https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1983/)

Author: Max Zheng <maxzheng.os@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5707 from maxzheng/minor-switch@trunk

(cherry picked from commit 50ec829)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
ewencp pushed a commit that referenced this pull request Oct 5, 2018
Pricing for m3.xlarge: On-Demand is at $0.266. Reserved is at about $0.16 (40% discount). And Spot is at $0.0627 (76% discount relative to On-Demand, or 60% discount relative to Reserved). Insignificant fluctuation in the past 3 months.

Ran on branch builder and works as expected -- each worker is created using spot instances (https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1982/console)

This can be safely backported to 0.10.2 (tested using https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1983/)

Author: Max Zheng <maxzheng.os@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5707 from maxzheng/minor-switch@trunk

(cherry picked from commit 50ec829)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
pengxiaolong pushed a commit to pengxiaolong/kafka that referenced this pull request Jun 14, 2019
Pricing for m3.xlarge: On-Demand is at $0.266. Reserved is at about $0.16 (40% discount). And Spot is at $0.0627 (76% discount relative to On-Demand, or 60% discount relative to Reserved). Insignificant fluctuation in the past 3 months.

Ran on branch builder and works as expected -- each worker is created using spot instances (https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1982/console)

This can be safely backported to 0.10.2 (tested using https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1983/)

Author: Max Zheng <maxzheng.os@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes apache#5707 from maxzheng/minor-switch@trunk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants