Last update: Tuesday, March 19th 2019
In order to keep the platform smooth and secure for all users, faastRuby Cloud has some limits. You should keep those in mind when designing your functions, and how they work together to make your application.
If you would like to see any of those limits raised, please reach out to us on Slack.
Current limits and restrictions
Context data (secrets)
- Context data max size is 4KB. That means you can't have a list of secrets for a function that exceeds 4000 characters.
- Context data must be in JSON format.
- When you deploy a function, the CLI makes a compressed package with the function's code and uploads to the API. The max size for this upload is 5MB.
- During runtime, a function is limited a maximum of 10 child threads/processes. You have to pay special attention to this if your function is doing multiple async calls to other functions. Each async call is done on a separate thread, so if you call MyFunction.call more than 10 times, you will get an error.
- Functions cannot write to disk. However, they can create Tempfiles.
- Functions are limited to 100MB of memory.
- The maximum size allowed for a static file is currently 5MB. If you need to host large files, we'd recommend using another service for the time being. For example, instead of having a video file, upload it to a video service like Youtube. Or use DigitalOcean Spaces / S3 Buckets. It is up to you.
While we are preparing the paid tiers, there are no limits in how many Runners a workspace can use.
- Runners can only serve a single request at a time. If you only have one Runner, make sure your functions respond as fast as possible. For example, if a function takes 100ms to run, it means you could reach a maximum theoretical rate of 10req/s when hitting the function's HTTP endpoint. Other factors like network latency may also affect the response rate.
- The platform will queue requests for ~15 seconds, waiting for a Runner to be available. The limit of requests queued is currently 10. If you feel like your requests are being queued, you need to add more Runners.
- You need at least 2 Runners to be able to make async calls to other functions. That's because one Runner will be busy waiting for another function to run, and this second function will need an available Runner.
- If you don't have any runners assigned to a workspace, requests to functions in that workspace will fail with error 429 - Too Many Requests.