{"id":4035,"date":"2025-10-30T17:34:07","date_gmt":"2025-10-30T09:34:07","guid":{"rendered":"https:\/\/aws-oncloudai.com\/?p=4035"},"modified":"2025-10-30T17:37:00","modified_gmt":"2025-10-30T09:37:00","slug":"aws-eventbridge-latency-latency-analysis-and-optimization-in-an-event-driven-architecture","status":"publish","type":"post","link":"https:\/\/aws-oncloudai.com\/zh_hk\/aws-eventbridge-latency-latency-analysis-and-optimization-in-an-event-driven-architecture\/","title":{"rendered":"AWS EventBridge Latency\uff1a\u4e8b\u4ef6\u9a45\u52d5\u67b6\u69cb\u4e0b\u7684\u5ef6\u9072\u89e3\u6790\u8207\u6700\u4f73\u5316"},"content":{"rendered":"<p>\u5728\u96f2\u7aef\u539f\u751f\u7cfb\u7d71\u4e2d\uff0c\u4e8b\u4ef6\u9a45\u52d5\u67b6\u69cb\uff08Event-driven Architecture, EDA\uff09\u5df2\u6210\u70ba\u5efa\u69cb\u9ad8\u64f4\u5c55\u6027\u8207\u9b06\u6563\u8026\u5408\u61c9\u7528\u7684\u6838\u5fc3\u6a21\u5f0f\u3002 Amazon EventBridge \u4f5c\u70baAWS \u63d0\u4f9b\u7684\u5168\u8a17\u7ba1\u4e8b\u4ef6\u532f\u6d41\u6392\u670d\u52d9\uff0c\u53ef\u5be6\u73fe\u8de8\u670d\u52d9\u3001\u8de8\u7cfb\u7d71\u7684\u4e8b\u4ef6\u50b3\u905e\u8207\u81ea\u52d5\u5316\u56de\u61c9\u3002\u7136\u800c\uff0c\u5728\u5206\u6563\u5f0f\u74b0\u5883\u4e0b\uff0c<strong>\u4e8b\u4ef6\u5ef6\u9072\uff08Latency\uff09<\/strong> \u76f4\u63a5\u5f71\u97ff\u7cfb\u7d71\u6548\u80fd\u8207\u4f7f\u7528\u8005\u9ad4\u9a57\u3002<\/p>\n<p>&nbsp;<\/p>\n<h4>\u4ec0\u9ebc\u662fEventBridge \u5ef6\u9072<\/h4>\n<p>EventBridge \u5ef6\u9072\u6307\u5f9e\u4e8b\u4ef6\u767c\u5e03\uff08PutEvent\uff09\u5230\u76ee\u6a19\u670d\u52d9\uff08Target\uff09\u63a5\u6536\u4e4b\u9593\u7684\u6642\u9593\u5dee\uff0c\u53cd\u6620\u4e8b\u4ef6\u5f9e\u300c\u89f8\u767c\u300d\u5230\u300c\u6d88\u8cbb\u300d\u7684\u901f\u5ea6\u3002<\/p>\n<p>\u5176\u6d41\u7a0b\u5305\u62ec\u4e8b\u4ef6\u5beb\u5165\u4e8b\u4ef6\u532f\u6d41\u6392\u3001\u914d\u5c0d\u898f\u5247\u3001\u6295\u905e\u76ee\u6a19\u53ca\u57f7\u884c\u4efb\u52d9\u3002\u5ef6\u9072\u901a\u5e38\u767c\u751f\u5728\u7db2\u8def\u50b3\u8f38\u8207\u898f\u5247\u5339\u914d\u968e\u6bb5\u3002<\/p>\n<p>&nbsp;<\/p>\n<h4>\u5178\u578b\u5ef6\u9072\u8868\u73fe<\/h4>\n<p>\u5728\u540c\u4e00\u5340\u57df\uff08In-region\uff09\u5167\uff0cEventBridge \u7684\u5e73\u5747\u5ef6\u9072\u901a\u5e38\u5c0f\u65bc <strong>0.5 \u79d2<\/strong>\uff0c\u591a\u6578\u5834\u666f\u7a69\u5b9a\u5728 <strong>\u5e7e\u5341\u81f3\u4e0a\u767e\u6beb\u79d2<\/strong>\u3002<\/p>\n<p>\u8de8\u5340\u57df\u50b3\u8f38\u6642\u5ef6\u7d04\u70ba <strong>1\u20132 \u79d2<\/strong>\uff0c\u9ad8\u5cf0\u671f\u6216\u8907\u96dc\u67b6\u69cb\u4e0b\u53ef\u80fd\u5ef6\u9577\u81f3\u6578\u79d2\u3002<\/p>\n<p>EventBridge \u4e26\u975e\u5373\u6642\u901a\u8a0a\u670d\u52d9\uff08\u5982WebSocket\uff09\uff0c\u5176\u8a2d\u8a08\u76ee\u6a19\u662f\u9ad8\u53ef\u9760\u7684\u975e\u540c\u6b65\u4e8b\u4ef6\u5206\u767c\u3002<\/p>\n<p>&nbsp;<\/p>\n<h4>\u5f71\u97ff\u5ef6\u9072\u7684\u4e3b\u8981\u56e0\u7d20<\/h4>\n<ol>\n<li><strong>\u4e8b\u4ef6\u5927\u5c0f\uff08Event Size\uff09<\/strong>\uff1a\u55ae\u4e00\u4e8b\u4ef6\u6700\u5927256 KB\uff0c\u9ad4\u7a4d\u8d8a\u5927\u50b3\u8f38\u8d8a\u6162\u3002<\/li>\n<li><strong>\u898f\u5247\u8907\u96dc\u5ea6\uff08Rule Complexity\uff09<\/strong>\uff1a\u591a\u5c64\u5339\u914d\u908f\u8f2f\u6703\u589e\u52a0\u8a55\u4f30\u6642\u9593\u3002<\/li>\n<li><strong>\u76ee\u6a19\u985e\u578b\uff08Target Type\uff09<\/strong>\uff1aLambda \u8207SQS \u5ef6\u9072\u6700\u4f4e\uff1bAPI Destinations\u3001Step Functions \u76f8\u5c0d\u8f03\u9ad8\u3002<\/li>\n<li><strong>\u8de8\u5340\u57df\u50b3\u8f38<\/strong>\uff1a\u5340\u57df\u9593\u50b3\u8f38\u9700\u7d93AWS \u5168\u7403\u7db2\u7d61\uff0c\u5ef6\u9072\u63d0\u6607\u660e\u986f\u3002<\/li>\n<li><strong>\u7cfb\u7d71\u8ca0\u8f09<\/strong>\uff1a\u9ad8\u4f75\u767c\u6216\u76ee\u6a19\u670d\u52d9\u58d3\u529b\u5927\u6642\u6703\u5f15\u767c\u6392\u968a\u3002<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4>\u76e3\u63a7\u8207\u6700\u4f73\u5316\u65b9\u6cd5<\/h4>\n<p>\u53ef\u900f\u904e <strong>Amazon CloudWatch Metrics<\/strong> \u76e3\u63a7\u6307\u6a19\u5982Invocations\u3001FailedInvocations\u3001DeliveryLatency\u3002<\/p>\n<p>\u512a\u5316\u65b9\u5411\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u5c31\u8fd1\u90e8\u7f72<\/strong>\uff1a\u4e8b\u4ef6\u6e90\u8207\u76ee\u6a19\u4f4d\u65bc\u540c\u4e00\u5340\u57df\uff1b<\/li>\n<li><strong>\u7cbe\u7c21\u898f\u5247<\/strong>\uff1a\u6e1b\u5c11\u8907\u96dcJSON \u5339\u914d\uff1b<\/li>\n<li><strong>\u62c6\u5206\u4e8b\u4ef6\u7e3d\u7dda<\/strong>\uff1a\u5206\u6d41\u9ad8\u4f75\u767c\u4e8b\u4ef6\uff1b<\/li>\n<li><strong>\u975e\u540c\u6b65\u8a2d\u8a08<\/strong>\uff1a\u7d50\u5408SQS\u3001SNS \u6216Lambda \u63d0\u9ad8\u541e\u5410\uff1b<\/li>\n<li><strong>\u63a7\u5236\u4e8b\u4ef6\u5927\u5c0f<\/strong>\uff1a\u50c5\u50b3\u905e\u95dc\u9375\u5b57\u6bb5\u3002<\/li>\n<\/ul>\n<p>\u5c0d\u65bc\u8907\u96dc\u5de5\u4f5c\u6d41\u7a0b\uff0c\u53ef\u7d50\u5408 <strong>AWS Step Functions<\/strong>\uff0c\u900f\u904e\u975e\u540c\u6b65\u7de8\u6392\u8207\u81ea\u52d5\u91cd\u8a66\u6a5f\u5236\u5e73\u8861\u5ef6\u9072\u8207\u53ef\u9760\u6027\u3002<\/p>\n<p>&nbsp;<\/p>\n<h4>\u61c9\u7528\u8207\u7e3d\u7d50<\/h4>\n<p>\u5728\u591a\u6578\u5834\u666f\u4e2d\uff0c\u6578\u5341\u81f3\u5e7e\u767e\u6beb\u79d2\u7684\u5ef6\u9072\u5c0d\u9ad4\u9a57\u5f71\u97ff\u6975\u5c0f\uff0c\u5982\u96fb\u5546\u8a02\u55ae\u6d41\u8f49\u3001\u65e5\u8a8c\u8b66\u544a\u3001IoT \u8cc7\u6599\u4e0a\u5831\u7b49\u3002<\/p>\n<p>EventBridge \u9069\u7528\u65bc\u5f37\u8abf\u53ef\u9760\u6027\u8207\u53ef\u64f4\u5c55\u6027\u7684\u975e\u540c\u6b65\u7cfb\u7d71\uff0c\u800c\u975e\u5373\u6642\u56de\u61c9\u985e\u696d\u52d9\u3002<\/p>\n<p>\u6574\u9ad4\u800c\u8a00\uff0cAWS EventBridge \u5728\u78ba\u4fdd\u9ad8\u53ef\u9760\u4e8b\u4ef6\u5206\u767c\u7684\u540c\u6642\uff0c\u80fd\u5c07\u5ef6\u9072\u63a7\u5236\u5728\u4e9e\u79d2\u7bc4\u570d\u3002\u900f\u904e\u5408\u7406\u67b6\u69cb\u8a2d\u8a08\u8207\u898f\u5247\u512a\u5316\uff0c\u958b\u767c\u8005\u53ef\u5728\u6548\u80fd\u8207\u7a69\u5b9a\u6027\u4e4b\u9593\u53d6\u5f97\u5e73\u8861\uff0c\u8b93\u4e8b\u4ef6\u9a45\u52d5\u7cfb\u7d71\u4ee5\u66f4\u5feb\u3001\u66f4\u7a69\u7684\u65b9\u5f0f\u56de\u61c9\u696d\u52d9\u8b8a\u5316\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>\u5728\u96f2\u7aef\u539f\u751f\u7cfb\u7d71\u4e2d\uff0c\u4e8b\u4ef6\u9a45\u52d5\u67b6\u69cb\uff08Event-driven Architecture, EDA\uff09\u5df2\u6210\u70ba\u5efa\u69cb\u9ad8\u64f4\u5c55\u6027\u8207\u9b06\u6563\u8026\u5408\u61c9\u7528\u7684\u6838\u5fc3\u6a21\u5f0f\u3002 Amazon EventBridge \u4f5c\u70baAWS \u63d0\u4f9b\u7684\u5168\u8a17\u7ba1\u4e8b\u4ef6\u532f\u6d41\u6392\u670d\u52d9\uff0c\u53ef\u5be6\u73fe\u8de8\u670d\u52d9\u3001\u8de8\u7cfb\u7d71\u7684\u4e8b\u4ef6\u50b3\u905e\u8207\u81ea\u52d5\u5316\u56de\u61c9\u3002\u7136\u800c\uff0c\u5728\u5206\u6563\u5f0f\u74b0\u5883\u4e0b\uff0c\u4e8b\u4ef6\u5ef6\u9072\uff08Latency\uff09 \u76f4\u63a5\u5f71\u97ff\u7cfb\u7d71\u6548\u80fd\u8207\u4f7f\u7528\u8005\u9ad4\u9a57\u3002<\/p>","protected":false},"author":1,"featured_media":4036,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[65],"tags":[],"class_list":["post-4035","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical-sharing"],"_links":{"self":[{"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/posts\/4035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/comments?post=4035"}],"version-history":[{"count":1,"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/posts\/4035\/revisions"}],"predecessor-version":[{"id":4037,"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/posts\/4035\/revisions\/4037"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/media\/4036"}],"wp:attachment":[{"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/media?parent=4035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/categories?post=4035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/tags?post=4035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}