简体   繁体   English

在AWS上的管道中使用AWS Spot实例

[英]Utilizing AWS Spot Instances in pipeline on AWS

Currently, trying to run a quantitative data processing pipeline utilizing RDS and EC2 instances on AWS. 当前,尝试在AWS上使用RDS和EC2实例运行定量数据处理管道。 There is one portion of the pipeline that requires significant computing power but is not mission or time critical and therefore I would like to use a cluster of EC2 spot instances at that point. 流水线中有一部分需要大量的计算能力,但对任务或时间的要求并不严格,因此我想在此时使用一组EC2竞价型实例。

I have been considering using the AWS Data Pipeline product in order to architect the pipeline. 我一直在考虑使用AWS Data Pipeline产品来构建管道。 However, I am unsure on how to integrate the spot instances. 但是,我不确定如何集成竞价型实例。 AWS documentation suggests that spot instances can be utilized in an AWS EMR cluster using the Data Pipeline, but not outside of them. AWS文档建议可以使用Data Pipeline在AWS EMR集群中使用竞价型实例,但不能在其外部使用。 Looking for suggestions or best practices. 寻找建议或最佳做法。

Spot instances can be used for both EC2 and EMR resources in data pipeline. 竞价型实例可用于数据管道中的EC2和EMR资源。

For an ec2 instance, you'll need to set the bidPrice attribute on the resource. 对于ec2实例,您需要在资源上设置bidPrice属性。 The pipeline definition for the ec2 resource should look like this. ec2资源的管道定义应如下所示。

    { 
      "id": "EC2Instance",
      "type": "Ec2Resource",
      "terminateAfter": "1 Hour",
      "spotBidPrice": "<my bid price from 0 to 20.0>"    
     }

For an emr cluster, you'll need to set the taskInstanceBidPrice attribute on the resource. 对于emr集群,您需要在资源上设置taskInstanceBidPrice属性。 The pipeline definition for the emr resource should look like this. emr资源的管道定义应如下所示。

    {
      "id" : "MyEmrCluster",
      "type" : "EmrCluster",
      "taskInstanceBidPrice": "<my bid price from 0 to 20.0>",
      "keypair" : "my-key-pair",
      "masterInstanceType" : "m3.xlarge",
      "coreInstanceType" : "m3.xlarge",
      "coreInstanceCount" : "10",
      "taskInstanceType" : "m3.xlarge",
      "taskInstanceCount": "10",
      "releaseLabel": "emr-4.1.0",
      "applications": ["spark", "hive", "pig"],
      "configuration": {"ref":"myConfiguration"}  
    }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM