Optimizing AWS Costs Significantly With a Free Jenkins Extension

DZone 's Guide to

Optimizing AWS Costs Significantly With a Free Jenkins Extension

The unpredictability of demand leads to increased costs for testing projects. See how a free Jenkins extension can help you save that money instead.

· DevOps Zone ·
Free Resource

The most common problem testing teams face is the unpredictability of the capacities’ demand needed for a certain project, which results in ever-growing costs for capacities that may not be used to the full scale or not used at all. Depending on the size of the project, these overpayments for downtime vary from hundreds to thousands of dollars.

How to Solve the Problem

Amazon Spot instances are significantly cheaper compared to on-demand instances (up to 90%). The only limitation users may face is Amazon guarantees 6-hour usage period after which instance may be interrupted. It depends on the demand for spot instances.

The first step is choosing the type of spot instance suitable for the project needs (note that on-demand instances are also available in conjunction with spot instances).

Spot Pricing

For one of our projects, we use m3.medium instances with a single executor. They have 1 vCPU and approx. 4Gb of RAM. They are suitable for the majority of the QA/dev jobs. Moreover, it has the biggest — 90% — discount on the spot market.

Solution Examples

Scalable pipeline approach integrated into AWS Spot market (no jobs = no costs) and scaling to thousands of instances when needed.

How Does It Help to Cut Costs?

Scalable Jenkins on Demand

Jenkins is scalable on demand using Amazon Spot Fleet instances. The Spot Fleet attempts to launch the number of Spot Instances that are required to meet the target capacity that you specified in the Spot Fleet request.

Image title

Image title

Actual Numbers of Savings

You can save up to 85% — it depends on the type of instance you are using.

Image title

Is there a significant difference in cutting costs when using other types of spot instances? It highly depends on the tasks and the size of the project.

Note: we do not recommend using T2 instances for Jenkins slaves since they have limitations in performance.

Below is a diagram showing the difference in costs:

Image title

Find other AWS Tools for reporting and cost optimization at the link.

amazon aws ,amazon ec2 ,devops ,jenkins ,software testing

Published at DZone with permission of Alexandra Gorobets . See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}