是否按实例隔离了Google App Engine tmp文件夹? [英] Is Google App Engine tmp folder isolated per instance?

查看:47
本文介绍了是否按实例隔离了Google App Engine tmp文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于/tmp/文件夹的信息很少,App Engine可用于写入文件. https://cloud.google.com/appengine/docs/standard/java/runtime-java8#Java_The_sandbox

There's very little information about the /tmp/ folder which App Engine can use to write files. https://cloud.google.com/appengine/docs/standard/java/runtime-java8#Java_The_sandbox

主要问题是,是否按实例隔离?如果实例保存文件,启动推送队列,该推送队列是否将由同一实例运行并能够读取文件?

The main question is if this is isolated per instance? And if an instance saves a file, starts a push queue, will the push queue be ran by the same instance and able to read the file?

谢谢

推荐答案

/tmp 目录实际上存在于内存中,因此对于每个GAE实例都是本地的.在您引用的文档中:

The /tmp directory actually exists in memory, so it is local to each GAE instance. From the doc you quoted:

/tmp 中的文件将消耗分配给您实例的内存.

Files in /tmp will consume the memory allocated to your instance.

通常,不能保证在将任务排队的同一实例上执行推送队列任务.

Typically the execution of a push queue task is not guaranteed to happen on the same instance that enqueued the task.

这种保证只能在非常特殊的情况下才能实现,而不是在典型情况下:您在手动运行一个实例的情况下使用手动扩展,并且该实例都使任务入队并(随后)对其进行处理.

This guarantee can only exist in a very specific, rather not typical case: you use manual scaling with exactly one instance running and that instance both enqueues the task and (later) processes it.

这篇关于是否按实例隔离了Google App Engine tmp文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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