Firebase Cloud Function:单个HTTP触发器类型函数在任何给定时间可以进行多少个并发调用? [英] Firebase Cloud Function:How many concurrent invocations a single HTTP trigger type function can have at any given time?

查看:26
本文介绍了Firebase Cloud Function:单个HTTP触发器类型函数在任何给定时间可以进行多少个并发调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自费率限制"中的文档,部分中,呼叫被限制为每100秒16次调用.但是我不确定这是否是关于onRequest/onCall HTTP触发器的.该限制似乎与某些CLI部署或通过Firebase控制台进行测试"有关.(无论这意味着什么),而不是来自客户端移动SDK的呼叫.如果该限制是合理的,那么对于广告规模可能扩大到数百万/数十亿"的事物来说,这似乎太过限制了.我有一个用例,其中500个左右的移动用户将调用HTTP端点,该端点将同时执行对Firestore的读/写操作以及一些处理.

解决方案

费率限制"表格

From the doc in "Rate Limit" section, calls are restricted to 16 invocations per 100 seconds. But I am not sure if it is saying about onRequest/onCall HTTP triggers. That limit seems to be related to some CLI deployment or "testing via Firebase Console" (whatever that means) and not a call from client mobile sdk. If the restriction is legitimate, then that seems too limiting for something that is advertised to scale to potentially "millions/billions". I have a use case where 500 or so mobile users will be calling an HTTP end point which will perform a mixture of read/write to Firestore + some processing at a moment notice.

解决方案

The "rate limits" table here mentions 16 invocations per 100 seconds, but the table is actually referring to usage limits on invoking the Cloud functions API to list/deploy cloud functions in a firebase project. Not invocation limits on the actual cloud fuctions which are much more generous.

The rate limits for background functions such as firebase event handlers (onCreate, onUpdate, etc) or PubSub scheduled functions, etc are 3000 concurrent invocations (for a function that takes 100 seconds to execute).

The rate limits for HTTP onCall functions are unlimited, at the moment. They simply scale up to accommodate higher traffic.

Background functions have additional limits, as explained below. These limits do not apply to HTTP functions

Here's a screenshot from cloud functions quota page

这篇关于Firebase Cloud Function:单个HTTP触发器类型函数在任何给定时间可以进行多少个并发调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆