Google app engine 如何正确配置GCP应用程序引擎
我正在努力理解我在设置应用程序引擎实例时使用的几个术语的区别和优点:Google app engine 如何正确配置GCP应用程序引擎,google-app-engine,google-cloud-platform,Google App Engine,Google Cloud Platform,我正在努力理解我在设置应用程序引擎实例时使用的几个术语的区别和优点: 我想知道服务器如何处理多个请求?是否需要为每个请求创建一个新的服务器代码实例,听起来不太可能,但我想澄清一下。或者它是否创建了我处理请求的函数的副本?我的一个典型功能如下所示: app.get("/", limiter, async function(req , res){ try { my code } catch (err){ console.log(err); re
app.get("/", limiter, async function(req , res){
try {
my code
} catch (err){
console.log(err);
res.status(400).send('Something went wrong')
}
})
runtime: nodejs12
env: standard
manual_scaling:
instances: 1 // Is this a bad idea in production?
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
app.get("/", limiter, async function(req , res){
try {
my code
} catch (err){
console.log(err);
res.status(400).send('Something went wrong')
}
})
runtime: nodejs12
env: standard
manual_scaling:
instances: 1 // Is this a bad idea in production?
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
请我需要帮助理解这一点,以便我可以正确设置我的实例
async function(req,res)
在您的例子中)被并发调用多次。每个调用将有一个单独的请求和响应实例(req
和res
)