英文:
How to do performance testing of a lambda which is triggered by event bridge?
问题
我有一个Lambda函数,每当事件被放入与我的Lambda连接的事件总线时,它会被自动触发。我如何进行性能测试以测试当一次有500个事件被放入时它的性能如何?
此外,我知道AWS有一些内置的指标,如Lambda执行时间、X-Ray跟踪等。有人能告诉我如何在我的用例中使用它们吗?
英文:
I have a lambda that is triggered whenever an event is dropped in the eventbus to which my lambda is connected and is triggered automatically. How can I performance test it to test how it performs of 500 events are dropped at a time?
Also I know aws has some inbuilt metrics like lambda execution time, xray tracing etc. Can anyone let me know how to use them for my use case?
答案1
得分: 1
如果你说的“eventbus”是指AWS EventBus,它是Amazon EventBrigde的一部分,我预期最简单的方法是使用PutEvents API端点。你可以创建一个包含500个事件的JSON负载,或者进行500次单独的调用,每次调用一个事件,或者你可以考虑任何组合。
请注意,AWS API请求需要进行签名,所以你选择的负载测试工具必须有计算这个签名的可能性。关于Apache JMeter的指南:如何处理JMeter中的动态AWS SigV4签名。
关于指标 - 可以查看AWS CloudWatch。
英文:
If by "eventbus" you mean AWS EventBus which is a part of Amazon EventBrigde my expectation is that the easiest would be using PutEvents API endpoint, you can come up with a JSON payload having 500 events or make 500 separate calls with 1 event or any combination you can think of.
Be aware that the AWS API requests need to be signed to the load testing tool you choose must have the possibility to calculate this signature. A guide for Apache JMeter: How to Handle Dynamic AWS SigV4 in JMeter
With regards to metrics - check out AWS CloudWatch
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论