- Newest
- Most votes
- Most comments
AWS Batch is a fully managed service that lets you run batch computing workloads on the AWS Cloud. It automatically provisions the required compute resources, including EC2 instances, and provides you with a simple way to execute batch jobs on those resources.
When you submit a job to AWS Batch, the job is placed in a job queue. The job queue determines the order in which the jobs are executed, and can be configured to use either a First In, First Out (FIFO) or a Round Robin scheduling algorithm.
The compute resources that are used to execute the jobs are managed in a separate compute environment. A compute environment is a logical grouping of EC2 instances that are used to execute the jobs in a job queue. You can create multiple compute environments and associate them with different job queues, depending on your needs.
When you submit a job to a job queue, AWS Batch will check the status of the associated compute environment to determine whether there are any available resources to execute the job. If there are available resources, AWS Batch will start executing the job on one of those resources. If there are no available resources, AWS Batch will wait until a resource becomes available or until you specify a timeout for the job.
You can specify the minimum and maximum number of EC2 instances that you want to use in a compute environment. AWS Batch will automatically scale the number of instances up or down to meet your workload needs, based on the number of pending jobs and the defined capacity constraints. You can also use Amazon EC2 Auto Scaling to fine-tune the scaling process and to add additional custom logic to the scaling process.
If i got you correctly, AWS engineers have you covered, dont know about your exact system, but you can do this
Use Amazon EC2 Spot Instances for your compute resources. Spot Instances allow you to take advantage of spare EC2 capacity at a significantly lower price than On-Demand Instances.
Use Amazon EC2 Auto Scaling to automatically scale your compute resources up or down based on the workload. You can set up a policy to scale out when the number of queued or running jobs increases beyond a certain threshold, and scale in when the workload decreases.
Use Amazon EC2 Fleet to automate the management of your compute resources. EC2 Fleet allows you to specify a target capacity and automatically launches the required number of Spot Instances or On-Demand Instances to meet your capacity needs.
Use Amazon CloudWatch alarms to monitor the queue size and the number of running jobs, and trigger an automatic scaling action based on the threshold that you set.
As always AWS is a business, there will be additional costs involved and many of the the products are structured to segment and get marginal value from different customer groups
Thank you for your answer. My Job queue is already using a Spot instance for compute environment, does this mean I am good to go and I dont need to worry as this will scale by its own?
Also from your comment "We can set up a policy to scale out when the number of queued or running jobs increases beyond a certain threshold, and scale in when the workload decreases."
I cant seem to find where in the AWS dashboard i can find the scale out settings to set the job threshold, can you point me please? :)
Relevant content
- asked 2 years ago
- Accepted Answerasked 2 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
OK, thank you for your answer. How do I make sure that my AWS batch is scalable, as you mentioned in your answer, if there are no resources available, it will wait until a a resources is available. Our requirement is to prevent waiting but instead, if there are no available resources, it will make one to speed up process. How can we acheive that?