AWS lambda and Java concurrency

后端 未结 2 1480
盖世英雄少女心
盖世英雄少女心 2020-12-23 19:24

It is known that AWS lambda may reuse early created objects of handlers, and it really does it (see FAQ):

Q: Will AWS Lambda reuse fu

2条回答
  •  一整个雨季
    2020-12-23 20:06

    Taking advantage of the execution context reuse is definitely a practice when working with AWS Lambda (See AWS Lambda Best Practices). But this does not apply to concurrent executions as for concurrent execution a new container is created and thus new context. In short, for concurrent executions if one handler changes the value other won't get the new value.

提交回复
热议问题