我们是由10位开发人员组成的团队,试图将流程密集型工作从Heroku上的Rails应用程序迁移到AWS Lambda(Java)。 我们在决定是通过API网关还是通过AWS Ruby SDK直接调用lambda函数时被阻止。 根据用例,我们可能不得不异步地调用lambda。 我们的有效载荷非常小(<1-2 KB)。 我们正在考虑直接调用以最大化执行时间。 我们在这里寻找指针:
API网关是否容易(和更快)验证调用lambda所需的IAM角色? B / W lambda和API网关的延迟是否有显着减少?We are a team of 10 developers, trying to move process intensive jobs from our Rails application on Heroku to AWS Lambda (Java). We are blocked on deciding whether to invoke lambda functions via API gateway or via AWS Ruby SDK directly. Depending on the use case, we might have to invoke lambda asynchronously as well. Our payload is very small (< 1-2 KB). We are considering direct invocation primarily to maximise execution time. We are looking for pointers here:
Is it easy(& faster) for API gateway to verify the IAM role required to invoke lambda ? Is there any significant reduction in latency b/w lambda and API gateway?最满意答案
正如其他人所说,添加API网关不会提高性能,但会增加额外的开销。 如果它提供的任何附加功能对您有用,请使用API网关。 如果您控制客户端,则可以在客户端上获得凭据直接调用Lambda函数的权限,并且不需要/不需要任何其他API网关功能,直接调用Lambda即可。
As others have stated, adding API Gateway does not improve performance but does add extra overhead. Use API Gateway if any of the additional feature it provides are useful to you. If you control the client, can get credentials on the client with permissions to invoke your Lambda functions directly, and don't need/want any of the additional API Gateway features, the go with the Lambda direct invoke.
更多推荐
发布评论