Hi!
I am working on a personal project that will use serverless functions extensively, which is a backend part I am still learning. I will use only async functions through the rest api.
One thing I noticed was the limits listed in the documentation.
So, I have a couple of questions:
Up to 120 concurrent functions
, does this mean 120 different functions being called at the time, or 120 invocations of any function running at the same time?This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hey @rafaeltragueta79,
Absolutely, let’s break it down:
Regarding the 120 concurrent functions, it’s about how many function invocations you can have running simultaneously, not the number of different functions. So yes, you can have 120 instances of your single async function executing at the same time.
When you reach this concurrency limit, DigitalOcean Functions will handle it gracefully. You’ll receive an error response for any invocation that exceeds this limit. This way, you can set up a retry mechanism in your code to handle such situations without keeping a count yourself.
As for the 600 invocations per minute limit, a managed service like DigitalOcean’s Managed Kafka is a great fit. You can produce events to a Kafka topic whenever you need to invoke a function. Then, your function can consume these events at a controlled pace that keeps you within the permissible rate. It’s a robust way to decouple your workload and manage spikes in demand.
https://www.digitalocean.com/products/managed-databases-kafka
Hope that helps!
- Bobby.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.