This guide outlines both methods, when to use them, and examples to help you determine the most suitable approach for processing inputs.
Single Input Processing | Batch Input Processing |
---|---|
โก Real-time results for fast actions | ๐๏ธโโ๏ธ Efficient for large datasets |
โฑ๏ธ Process one input at a time | ๐ Send multiple inputs in one go |
๐ซ Cold start may occur | โ Reduces network overhead |
๐ก Best for time-sensitive tasks | โก Great for bulk updates |
โ More API calls for large data | ๐ ๏ธ Fewer API calls, better for scaling |
๐ Needs faster feedback | ๐ Best for large-scale enrichment |
Use Case | Recommendation | Reason |
---|---|---|
Enriching a user at signup | Single Input | Faster response for real-time needs. |
Updating large databases | Batch Processing | More efficient for high volumes of data. |
429 error
. Runs wonโt be queued automatically, so youโll need to handle this error on your side.