Cloud Functions 在发送请求时是否使用相同的 IP [英] Do Cloud Functions use the same IP when sending requests

查看:17
本文介绍了Cloud Functions 在发送请求时是否使用相同的 IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我正在使用 express.js 在 Cloud Functions 上运行 Web 服务 API.我想知道云功能是否每次都使用相同的 IP 地址来发送请求.

So I am running an web service API on Cloud Functions with express.js. I am wondering if cloud functions use the same IP address to send requests every time.

我的用户正在发送请求并从 CF 获得响应.每次用户发送请求时,CF 都会向第三方 API 发送请求以获取一些数据.我希望能够限制 CF 每分钟向第三方 API 发送的请求数.第三方 API 有 IP 限制,所以我尝试从不同的 IP 发送请求.触发函数时,CF 是否使用相同的 IP?还是不同的 IP 地址?

My users are sending requests and getting responses from the CFs. Every time a user sends a request, CF sends a request to third party API to get some data. I want to be able to limit the number of requests sent to the third party API each minute by the CFs. The third party API has an IP limitation, so Im trying to send requests from different IPs. Do CFs use the same IP when a function is triggered? or different IP addresses?

推荐答案

无法保证来自 Cloud Functions 的请求可能来自哪个 IP 地址.您不应依赖任何明显的 IP,因为它们可能会随着系统升级和扩展而改变.

There are no guarantees about which IP address that requests from Cloud Functions may appear to come from. You should not depend on any apparent IPs, as they may change over time as the system upgrades and scales.

这篇关于Cloud Functions 在发送请求时是否使用相同的 IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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