Skip to main content
Became Hot Network Question
added 375 characters in body
Source Link

I am working on a system that currently relies on batch apex to process ten of thousands of records by hitting an external API to pass data to another system for processing.

We get a "success" or "error" response from the HTTP request, and then later, we receive a post back to see the true processing state of the API call.

If each of these API calls takes 1 sec to process, and I am running 50k of these, then what would be my maximum throughput in external API calls/second?

Right now, it appears that since I am using a call to Database.executeBatch(batchToStart, TOTAL_BATCH_SIZE);, then everything is running sequentially, and I am getting 1 call API / per second.

I believe I could split the job up manually into batches and get a maximum of 5 calls / per second ( if no other jobs are running). Is this correct?

I can only have 5 jobs running in parallel, and there is no way to run the API calls in parallel within the job.

Additionally ( thanks to @identigral )

This post : Throttling http callouts across queueables executed in parallel

Indicates that if we move to Queuable, then we could get a max of 50 calls per second. Is this the correct conclusion?

I would like 1000 calls / second , do I need to move off of platform?

I am working on a system that currently relies on batch apex to process ten of thousands of records by hitting an external API to pass data to another system for processing.

We get a "success" or "error" response from the HTTP request, and then later, we receive a post back to see the true processing state of the API call.

If each of these API calls takes 1 sec to process, and I am running 50k of these, then what would be my maximum throughput in external API calls/second?

Right now, it appears that since I am using a call to Database.executeBatch(batchToStart, TOTAL_BATCH_SIZE);, then everything is running sequentially, and I am getting 1 call API / per second.

I believe I could split the job up manually into batches and get a maximum of 5 calls / per second ( if no other jobs are running). Is this correct?

I can only have 5 jobs running in parallel, and there is no way to run the API calls in parallel within the job.

I am working on a system that currently relies on batch apex to process ten of thousands of records by hitting an external API to pass data to another system for processing.

We get a "success" or "error" response from the HTTP request, and then later, we receive a post back to see the true processing state of the API call.

If each of these API calls takes 1 sec to process, and I am running 50k of these, then what would be my maximum throughput in external API calls/second?

Right now, it appears that since I am using a call to Database.executeBatch(batchToStart, TOTAL_BATCH_SIZE);, then everything is running sequentially, and I am getting 1 call API / per second.

I believe I could split the job up manually into batches and get a maximum of 5 calls / per second ( if no other jobs are running). Is this correct?

I can only have 5 jobs running in parallel, and there is no way to run the API calls in parallel within the job.

Additionally ( thanks to @identigral )

This post : Throttling http callouts across queueables executed in parallel

Indicates that if we move to Queuable, then we could get a max of 50 calls per second. Is this the correct conclusion?

I would like 1000 calls / second , do I need to move off of platform?

Source Link

Maximum throughput for Batch Apex?

I am working on a system that currently relies on batch apex to process ten of thousands of records by hitting an external API to pass data to another system for processing.

We get a "success" or "error" response from the HTTP request, and then later, we receive a post back to see the true processing state of the API call.

If each of these API calls takes 1 sec to process, and I am running 50k of these, then what would be my maximum throughput in external API calls/second?

Right now, it appears that since I am using a call to Database.executeBatch(batchToStart, TOTAL_BATCH_SIZE);, then everything is running sequentially, and I am getting 1 call API / per second.

I believe I could split the job up manually into batches and get a maximum of 5 calls / per second ( if no other jobs are running). Is this correct?

I can only have 5 jobs running in parallel, and there is no way to run the API calls in parallel within the job.