{"id":16483,"date":"2017-05-31T11:54:09","date_gmt":"2017-05-31T02:54:09","guid":{"rendered":"http:\/\/labs.gree.jp\/blog\/?p=16483"},"modified":"2019-05-13T17:48:28","modified_gmt":"2019-05-13T08:48:28","slug":"post16483","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2017\/05\/16483\/","title":{"rendered":"SQS\u3001ElastiCache\u3001Lambda\u3067\u4f5c\u308b\u9ad8\u53ef\u7528\u306a\u30a2\u30e9\u30fc\u30c8\u901a\u77e5\u30b7\u30b9\u30c6\u30e0"},"content":{"rendered":"<p>\u30a4\u30f3\u30d5\u30e9\u306e\u3044\u308f\u307b\u308a\uff08@egmc\uff09\u3067\u3059\u3002<br \/>\n\u30b5\u30fc\u30d0\u76e3\u8996\u3092\u69cb\u6210\u3059\u308b\u30b7\u30b9\u30c6\u30e0\u306f\u8272\u3005\u3042\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u306fAWS\u74b0\u5883\u4e0a\u3067\u306e\u76e3\u8996\u306b\u4f7f\u308f\u308c\u3066\u3044\u308b\u30a2\u30e9\u30fc\u30c8\u901a\u77e5\u306e\u4ed5\u7d44\u307f\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3055\u305b\u3066\u9802\u304d\u307e\u3059\u3002<\/p>\n<p>\u76e3\u8996\u30b7\u30b9\u30c6\u30e0\u306e\u69cb\u7bc9\u305d\u306e\u3082\u306e\u306f2015\u5e74\u9803\u3001AWS\u306e\u672c\u683c\u7684\u306a\u5229\u7528\u306b\u4f34\u3044\u3001AWS\u74b0\u5883\u3092\u5bfe\u8c61\u3068\u3057\u305f\u65b0\u898f\u30b7\u30b9\u30c6\u30e0\uff08AWS\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\uff09\u306e\u69cb\u7bc9\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u3066\u4f5c\u6210\u3055\u308c\u305f\u3082\u306e\u3067\u3059\u304c\u3001\u7a3c\u50cd\u304b\u3089\u7d042\u5e74\u304c\u7d4c\u904e\u3057\u3001\u305d\u308c\u306a\u308a\u306b\u5b9f\u7e3e\u304c\u7a4d\u3081\u3066\u304d\u305f\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u901a\u77e5\u30b7\u30b9\u30c6\u30e0\u306b\u306fYusura\u3068\u3044\u3046\u540d\u524d\u304c\u3064\u3044\u3066\u3044\u3066\u3001\u6a5f\u80fd\u7684\u306b\u306f\u904e\u53bb\u306e\u30a8\u30f3\u30c8\u30ea\u3067\u7d39\u4ecb\u3055\u308c\u3066\u3044\u305f<a href=\"http:\/\/labs.gree.jp\/blog\/2011\/01\/2390\/\">AWACS<\/a>\u306b\u8fd1\u3044\u3082\u306e\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u4e3b\u306a\u6a5f\u80fd\u3068\u3057\u3066\u306f<\/p>\n<ul>\n<li>\u8a2d\u5b9a\u306b\u57fa\u3065\u3044\u305f\u901a\u77e5\u5148\u306e\u632f\u308a\u5206\u3051<\/li>\n<li>\u30a2\u30e9\u30fc\u30c8\u306e\u96c6\u7d04(summarize)<\/li>\n<li>\u540c\u4e00\u30a2\u30e9\u30fc\u30c8\u306e\u6291\u5236\uff08suppress\uff09<\/li>\n<li>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30bf\u30b0\u60c5\u5831\u306b\u57fa\u3065\u3044\u305fignore\u51e6\u7406\uff08\u7279\u5b9a\u306e\u30bf\u30b0\u304c\u3064\u3044\u3066\u3044\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u901a\u77e5\u306e\u5bfe\u8c61\u3068\u3059\u308b\uff09<\/li>\n<\/ul>\n<p>\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<h2><a id=\"user-content-aws\u74b0\u5883\u306b\u304a\u3051\u308b\u30a2\u30e9\u30fc\u30c8\u306e\u30d5\u30ed\u30fc\" class=\"anchor\" href=\"https:\/\/gist.github.com\/egmc\/e2fa51a75c2873a8e350eaa75cc52d4d#aws\u74b0\u5883\u306b\u304a\u3051\u308b\u30a2\u30e9\u30fc\u30c8\u306e\u30d5\u30ed\u30fc\"><\/a>AWS\u74b0\u5883\u306b\u304a\u3051\u308b\u30a2\u30e9\u30fc\u30c8\u306e\u30d5\u30ed\u30fc<\/h2>\n<p>AWS\u74b0\u5883\u4e0a\u306e\u30a2\u30e9\u30fc\u30c8\u901a\u77e5\u306f\u4e0b\u56f3\u306e\u3088\u3046\u306a\u30d5\u30ed\u30fc\u3067\u884c\u308f\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/05\/spec-aws-monitoring-overview.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-16481 size-full\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/05\/spec-aws-monitoring-overview.png\" alt=\"\" width=\"1221\" height=\"935\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/05\/spec-aws-monitoring-overview.png 1221w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/05\/spec-aws-monitoring-overview-261x200.png 261w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/05\/spec-aws-monitoring-overview-522x400.png 522w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/05\/spec-aws-monitoring-overview-768x588.png 768w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/05\/spec-aws-monitoring-overview-830x636.png 830w\" sizes=\"auto, (max-width: 1221px) 100vw, 1221px\" \/><\/a><\/p>\n<p>\u767b\u5834\u4eba\u7269\u304c\u591a\u3044\u3067\u3059\u304c\u3001<\/p>\n<ul>\n<li>gmond<\/li>\n<li>gangi\uff08\u5185\u88fd\uff09<\/li>\n<\/ul>\n<p>\u306f\u5404\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304b\u3089\u30e1\u30c8\u30ea\u30af\u30b9\u3092\u53ce\u96c6\u3057\u3001Prometheus\u3078\u9001\u308b\u5f79\u5272\u3092\u62c5\u3063\u3066\u304a\u308a\u3001\u30a2\u30e9\u30fc\u30c8\u306e\u901a\u77e5\u5143\u3068\u3057\u3066\u306f<\/p>\n<ul>\n<li>amaneko\uff08\u5185\u88fd\uff09 - \u30d7\u30ed\u30bb\u30b9\u306e\u6b7b\u6d3b\u76e3\u8996\u3084\u7c21\u6613\u30ed\u30b0\u30c1\u30a7\u30c3\u30af\u306a\u3069\u3092\u884c\u3046\u30c4\u30fc\u30eb<\/li>\n<li>Prometheus - \u30ea\u30bd\u30fc\u30b9\u76e3\u8996\u3002<\/li>\n<li>fluentd - \u30ed\u30b0\u76e3\u8996<\/li>\n<\/ul>\n<p>\u304c\u305d\u308c\u305e\u308cAWS\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3067\u5b9a\u3081\u305f\u6240\u5b9a\u306ejson\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5f93\u3044\u30a2\u30e9\u30fc\u30c8\u3092\u76e3\u8996\u7528\u30a2\u30ab\u30a6\u30f3\u30c8\u306eSQS\u30ad\u30e5\u30fc\u306b\u9001\u308a\u3001Yusura\u304c\u305d\u308c\u3089\u3092\u51e6\u7406\u3057\u3001\u30e1\u30fc\u30eb\u3001\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u7b49\u306b\u901a\u77e5\u3059\u308b\u69cb\u6210\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>json\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u5b9a\u7fa9\u306f\u72ec\u81ea\u306e\u3082\u306e\u3067\u3059\u304c\u7279\u306b\u96e3\u3057\u3044\u3082\u306e\u3067\u3082\u306a\u304f\u3001\u30a2\u30e9\u30fc\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u4ed6\u306b<\/p>\n<ul>\n<li>\u30d7\u30ed\u30c0\u30af\u30c8\u540d<\/li>\n<li>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30bf\u30a4\u30d7\uff08ec2\u3001rds\u306a\u3069\uff09<\/li>\n<li>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9ID<\/li>\n<li>\u30db\u30b9\u30c8\u540d<\/li>\n<li>\u30ea\u30fc\u30b8\u30e7\u30f3<\/li>\n<li>\u6642\u523b\u60c5\u5831<\/li>\n<li>\u30c1\u30a7\u30c3\u30af\u5143\u306e\u30bf\u30a4\u30d7\uff08\u30ed\u30b0\u7cfb\u304b\u30ea\u30bd\u30fc\u30b9\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3092\u8868\u3059\u3082\u306e\u304b\u7b49\uff09<\/li>\n<li>\u30c1\u30a7\u30c3\u30af\u30bd\u30fc\u30b9\uff08\u30ed\u30b0\u540d\u3001\u30c1\u30a7\u30c3\u30af\u30b9\u30af\u30ea\u30af\u30c8\u540d\u3001\u30a2\u30e9\u30fc\u30c8\u8a2d\u5b9a\u540d\u306a\u3069\uff09<\/li>\n<li>\u5f37\u5236\u9001\u4fe1\u7528\u306e\u30d5\u30e9\u30b0<\/li>\n<\/ul>\n<p>\u306a\u3069\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u542b\u3081\u305f\u3082\u306e\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>Yusura\u81ea\u4f53\u306fruby\u3067\u5b9f\u88c5\u3055\u308c\u3001\u30ad\u30e5\u30fc\u51e6\u7406\u3092\u884c\u3046\u30ef\u30fc\u30ab\u30fc\u3068\u3057\u3066\u3001<a href=\"https:\/\/github.com\/phstc\/shoryuken\">shoryuken<\/a>\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30b0\u30ea\u30fc\u3067\u306f\u30d7\u30ed\u30c0\u30af\u30c8\u6bce\u306bAWS\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u5206\u3051\u308b\u904b\u7528\u3092\u884c\u3063\u3066\u3044\u308b\u305f\u3081\u3001SQS\u5074\u3067\u5404\u30a2\u30ab\u30a6\u30f3\u30c8\u304b\u3089\u306e\u30af\u30ed\u30b9\u30a2\u30ab\u30a6\u30f3\u30c8\u30a2\u30af\u30bb\u30b9\u3092\u8a31\u53ef\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u76e3\u8996\u72b6\u614b\u3092\u7ba1\u7406\u3059\u308b\u30bf\u30b0\u60c5\u5831\u3092\u53ce\u62fe\u3059\u308b\u305f\u3081\u3001Monitoring\u30a2\u30ab\u30a6\u30f3\u30c8\u304b\u3089\u76e3\u8996\u5bfe\u8c61\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u4e88\u3081\u8a2d\u7f6e\u3057\u305f\u5c02\u7528\u306eIAM Role\u306b\u5bfe\u3057\u3066AssumeRole\u306b\u3088\u308b\u30af\u30ed\u30b9\u30a2\u30ab\u30a6\u30f3\u30c8\u30a2\u30af\u30bb\u30b9\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2><a id=\"user-content-aws\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306b\u304a\u3051\u308byusura\u306e\u8981\u4ef6\" class=\"anchor\" href=\"https:\/\/gist.github.com\/egmc\/e2fa51a75c2873a8e350eaa75cc52d4d#aws\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306b\u304a\u3051\u308byusura\u306e\u8981\u4ef6\"><\/a>AWS\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306b\u304a\u3051\u308bYusura\u306e\u8981\u4ef6<\/h2>\n<p>\u5f79\u5272\u3068\u3057\u3066\u306f\u300c\u30a2\u30e9\u30fc\u30c8\u306e\u6d41\u91cf\u3092\u6291\u3048\u3064\u3064\u4f4e\u9045\u5ef6\u3067\u9069\u5207\u306b\u632f\u308a\u5206\u3051\u308b\u300d\u3068\u3044\u3063\u305f\u3053\u3068\u306b\u306a\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002 \u305d\u306e\u4ed6\u306b\u6c42\u3081\u3089\u308c\u305f\u8981\u4ef6\u3068\u3057\u3066<\/p>\n<ul>\n<li>\u306a\u308b\u3079\u304fYusura\u81ea\u4f53\u306e\u904b\u7528\u306f\u3042\u307e\u308a\u3057\u306a\u3044\u3067\u6e08\u3080\u3088\u3046\u3001\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u30d5\u30ea\u30fc\u306a\u69cb\u6210\u3068\u3059\u308b<\/li>\n<li>\u305d\u306e\u305f\u3081\u306b\u9069\u5207\u306a\u30de\u30cd\u30fc\u30b8\u30c9\u30b5\u30fc\u30d3\u30b9\u304c\u3042\u308c\u3070\u6d3b\u7528\u3059\u308b<\/li>\n<li>\u898f\u6a21\u306e\u62e1\u5927\u306b\u5bfe\u5fdc\u51fa\u6765\u308b\u3088\u3046\u30b9\u30b1\u30fc\u30eb\u30a2\u30a6\u30c8\u53ef\u80fd\u306a\u69cb\u6210\u3068\u3059\u308b<\/li>\n<\/ul>\n<p>\u304c\u6319\u3052\u3089\u308c\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<h2><a id=\"user-content-\u30a2\u30e9\u30fc\u30c8\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\" class=\"anchor\" href=\"https:\/\/gist.github.com\/egmc\/e2fa51a75c2873a8e350eaa75cc52d4d#\u30a2\u30e9\u30fc\u30c8\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\"><\/a>\u30a2\u30e9\u30fc\u30c8\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb<\/h2>\n<p>\u5927\u91cf\u306e\u30a2\u30e9\u30fc\u30c8\u3092\u305d\u306e\u307e\u307e\u6d41\u3057\u3066\u3057\u307e\u3046\u3068\u901a\u77e5\u5148\u30b5\u30fc\u30d3\u30b9\u306eAPI\u5236\u9650\u3092\u8d8a\u3048\u3066\u3057\u307e\u3063\u305f\u308a\u3001\u305d\u3082\u305d\u3082\u901a\u77e5\u3068\u3057\u3066\u4eba\u9593\u304c\u30c1\u30a7\u30c3\u30af\u51fa\u6765\u308b\u3082\u306e\u3067\u306f\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u540c\u7a2e\u306e\u30a2\u30e9\u30fc\u30c8\u3092\u307e\u3068\u3081\u305f\u308a\u9593\u5f15\u304f\u51e6\u7406\u3092Yusura\u3067\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u540c\u4e00\u30a2\u30e9\u30fc\u30c8\u3067\u7570\u306a\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304b\u3089\u306e\u30a2\u30e9\u30fc\u30c8\u3092\u307e\u3068\u3081\u308b\uff08summarize\uff09<\/li>\n<li>\u985e\u4f3c\u30a2\u30e9\u30fc\u30c8\u306e\u30b5\u30de\u30e9\u30a4\u30b8\u30f3\u30b0\uff08\u30a2\u30e9\u30fc\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u5185\u5bb9\u306b\u5fdc\u3058\u305fsummarize\u3001\u30ed\u30b0\u7cfb\u306e\u307f\u4f7f\u7528\uff09<\/li>\n<li>\u540c\u4e00\u30a2\u30e9\u30fc\u30c8\u304b\u3064\u540c\u4e00\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u9593\u5f15\u304d\uff08suppress\uff09<\/li>\n<\/ul>\n<p>\u57fa\u672c\u7684\u306b\u306f\u307e\u305a\u65b0\u898f\u306e\u30a2\u30e9\u30fc\u30c8\u306f\u5fc5\u305a\u767a\u5831\u5bfe\u8c61\u3068\u306a\u308a\u3001\u305d\u306e\u5f8c\u540c\u7a2e\u306e\u30a2\u30e9\u30fc\u30c8\u304c\u6765\u305f\u3089\u4e00\u5b9a\u6642\u9593\u6e9c\u3081\u8fbc\u307f\u3001\u307e\u3068\u3081\u3066\u901a\u77e5\u3092\u3059\u308b\u3088\u3046\u306a\u6319\u52d5\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30ed\u30b0\u3084php\u30ed\u30b0\u306a\u3069\u306e\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u306b\u5f15\u3063\u304b\u304b\u3063\u305f\u30a2\u30e9\u30fc\u30c8\u306f\u3001\u540c\u4e00\u306e\u30a8\u30e9\u30fc\u5185\u5bb9\u3067\u3042\u3063\u3066\u3082\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u306a\u3069\u304c\u30ed\u30b0\u30ec\u30b3\u30fc\u30c9\u306b\u542b\u307e\u308c\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u5dee\u7570\u304c\u51fa\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u5148\u306b\u767a\u5831\u3055\u308c\u305f\u30a2\u30e9\u30fc\u30c8\u3068\u306e\u985e\u4f3c\u5ea6\u3092\u898b\u3066\u3057\u304d\u3044\u5024\u3092\u8d8a\u3048\u3066\u3044\u305f\u3089\uff08\u73fe\u5728\u306f70%\u7a0b\u5ea6\uff09\u307e\u3068\u3081\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ed5\u7d44\u307f\u3068\u3057\u3066\u306f\u5358\u7d14\u3067\u3059\u304c\u3001\u8a2d\u5b9a\u3067\u7d30\u304b\u304f\u30e1\u30f3\u30c6\u305b\u305a\u3068\u3082\u672a\u77e5\u306e\u30a2\u30e9\u30fc\u30c8\u306b\u5bfe\u3057\u3066\u305d\u308c\u306a\u308a\u306b\u3046\u307e\u304f\u6a5f\u80fd\u3057\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h2><a id=\"user-content-yusura\u306e\u69cb\u6210\" class=\"anchor\" href=\"https:\/\/gist.github.com\/egmc\/e2fa51a75c2873a8e350eaa75cc52d4d#yusura\u306e\u69cb\u6210\"><\/a>Yusura\u306e\u69cb\u6210<\/h2>\n<p>\u30a2\u30e9\u30fc\u30c8\u3092\u6271\u3046\u3068\u3044\u3046\u6027\u8cea\u4e0a\u3001\u53ef\u7528\u6027\u3092\u62c5\u4fdd\u3059\u308b\u305f\u3081Yusura\u306f\u53ef\u80fd\u306a\u9650\u308a\u5197\u9577\u69cb\u6210\u3092\u53d6\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-16498 alignnone\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/05\/yusura-structure-1-522x400.png\" alt=\"\" width=\"522\" height=\"400\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/05\/yusura-structure-1-522x400.png 522w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/05\/yusura-structure-1-261x200.png 261w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/05\/yusura-structure-1.png 671w\" sizes=\"auto, (max-width: 522px) 100vw, 522px\" \/><\/p>\n<p>\u30ef\u30fc\u30ab\u30fc\u3092\u52d5\u304b\u3059EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306fAZ\u3092\u5206\u3051\u3001\u305d\u308c\u305e\u308c\u306bNAT\u3092\u914d\u7f6e\u3057\u3066\u901a\u4fe1\u3001Redis\u306fMult-AZ\u3067\u305d\u308c\u305e\u308c\u5197\u9577\u5316\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30ea\u30ea\u30fc\u30b9\u5f53\u521d\u306fcron\u3067\u5b9a\u671f\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001Lambda\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u306e\u5b9a\u671f\u5b9f\u884c\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3001Lambda\u304b\u3089\u5b9a\u671f\u7684\u306bSQS\u3078\u5b9f\u884c\u3059\u3079\u304d\u30b8\u30e7\u30d6\u3092json\u3067\u30a8\u30f3\u30ad\u30e5\u30fc\u3057\u3001\u3044\u305a\u308c\u304b\u306e\u30ef\u30fc\u30ab\u30fc\u304c\u62fe\u3063\u3066\u51e6\u7406\u3092\u884c\u3046\u3001\u3068\u3044\u3046\u5f62\u5f0f\u306b\u3059\u308b\u3053\u3068\u3067\u7279\u5b9a\u306e\u30d0\u30c3\u30c1\u30b5\u30fc\u30d0\u306a\u3069\u306b\u4f9d\u5b58\u305b\u305a\u306b\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>SQS\u306e\u30ad\u30e5\u30fc\u304c\u552f\u4e00SPOF\u306b\u898b\u3048\u307e\u3059\u304c\u3001\u3053\u3061\u3089\u306fAWS\u306e\u30de\u30cd\u30fc\u30b8\u30c9\u30b5\u30fc\u30d3\u30b9\u3067\u3042\u308a\u3001\u57fa\u672c\u7684\u306bAWS\u5074\u3067\u5197\u9577\u5316\u3055\u308c\u3066\u3044\u308b\u3067\u3042\u308d\u3046\u3068\u3044\u3046\u3053\u3068\u3067\u4efb\u305b\u3066\u3044\u307e\u3059\uff08SQS\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306eIP\u306f\u5b9a\u671f\u7684\u306b\u5909\u5316\u3057\u3066\u304a\u308a\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u5148\u306e\u5206\u6563\u3092\u884c\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u7aba\u3048\u307e\u3059\uff09\u3002<br \/>\n\u5c11\u306a\u304f\u3068\u3082\u7d042\u5e74\u9593\u306e\u7a3c\u50cd\u306b\u304a\u3044\u3066SQS\u5074\u304c\u8d77\u56e0\u3068\u306a\u3063\u3066\u306e\u554f\u984c\u306f\u7279\u306b\u8d77\u304d\u3066\u306f\u3044\u306a\u3044\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001Yusura\u81ea\u4f53\u306e\u969c\u5bb3\u306f\u4ed6\u306b\u7a3c\u50cd\u3057\u3066\u3044\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u305d\u3053\u304b\u3089\u901a\u77e5\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u4eee\u306b\u5168\u53f0\u304c\u30b5\u30fc\u30d3\u30b9\u505c\u6b62\u3057\u3066\u3057\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u306a\u5834\u5408\u306f\u3001\u5404\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304b\u3089cron\u3067\u9001\u4fe1\u3057\u3066\u3044\u308b\u30d7\u30ed\u30bb\u30b9\u30c1\u30a7\u30c3\u30af\u306b\u7570\u5e38\u304c\u3042\u308b\u3053\u3068\u304cCloudWatch\u5074\u3067\u691c\u77e5\u3055\u308c\u3001\u5225\u7d4c\u8def\u306b\u3066\u30a2\u30e9\u30fc\u30c8\u304c\u767a\u5831\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2><a id=\"user-content-\u5b9f\u88c5\u9762\u306e\u8a71\" class=\"anchor\" href=\"https:\/\/gist.github.com\/egmc\/e2fa51a75c2873a8e350eaa75cc52d4d#\u5b9f\u88c5\u9762\u306e\u8a71\"><\/a>\u5b9f\u88c5\u9762\u306e\u8a71<\/h2>\n<p>Yusura\u306e\u30ef\u30fc\u30ab\u30fc\u306f\u8907\u6570\u306e\u30b5\u30fc\u30d0\u306b\u5206\u6563\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u5404\u30ef\u30fc\u30ab\u30fc\u5185\u3067\u306f\u6975\u529b\u72b6\u614b\u3092\u6301\u305f\u305aRedis\u306b\u5bc4\u305b\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u30b5\u30de\u30e9\u30a4\u30ba\u3055\u308c\u305f\u30a2\u30e9\u30fc\u30c8\u306e\u767a\u5831\u30b8\u30e7\u30d6\u304c\u5404\u30ef\u30fc\u30ab\u30fc\u3067\u540c\u6642\u306b\u51e6\u7406\u3055\u308c\u305f\u5834\u5408\u3084\u3001\u30b5\u30de\u30e9\u30a4\u30ba\u5bfe\u8c61\u306e\u30a2\u30e9\u30fc\u30c8\u30c7\u30fc\u30bf\u304c\u65e2\u306b\u5b58\u5728\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3001\u306a\u3069\u306e\u5224\u5b9a\u306fatomic\u306a\u51e6\u7406\u304c\u5fc5\u8981\u3068\u306a\u308b\u305f\u3081\u3001\u305d\u3046\u3044\u3063\u305f\u90e8\u5206\u306fRedis\u306eAPI\u30ec\u30d9\u30eb\u3067\u4fdd\u8a3c\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u57fa\u672c\u7684\u306bYusura\u3067\u6271\u3046\u30c7\u30fc\u30bf\u306f\u5b9a\u671f\u7684\u306b\u53ce\u96c6\u3055\u308c\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30bf\u30b0\u60c5\u5831\u3084\u5404\u30a2\u30e9\u30fc\u30c8\u306e\u4e00\u6642\u7684\u306a\u72b6\u614b\u7ba1\u7406\u306a\u3069\u306a\u306e\u3067\u3001\u6271\u3046\u30c7\u30fc\u30bf\u306b\u306f\u3059\u3079\u3066expire\u3092\u8a2d\u5b9a\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2><a id=\"user-content-\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30ea\u30f3\u30b0\" class=\"anchor\" href=\"https:\/\/gist.github.com\/egmc\/e2fa51a75c2873a8e350eaa75cc52d4d#\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30ea\u30f3\u30b0\"><\/a>\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30ea\u30f3\u30b0<\/h2>\n<p>\u30a2\u30e9\u30fc\u30c8\u901a\u77e5\u306f\u9045\u5ef6\u3057\u3066\u3057\u307e\u3046\u3068\u691c\u77e5\u304c\u9045\u308c\u3001\u30a2\u30e9\u30fc\u30c8\u3068\u3057\u3066\u306e\u4fa1\u5024\u304c\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u53ef\u80fd\u306a\u9650\u308a\u901f\u3084\u304b\u306b\u30ad\u30e5\u30fc\u3092\u6e9c\u3081\u305a\u306b\u51e6\u7406\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>AWS\u4e0a\u306e\u76e3\u8996\u5bfe\u8c61\u30b5\u30fc\u30d0\u306f\u305d\u308c\u306a\u308a\u306b\u591a\u3044\u305f\u3081\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4e0d\u5177\u5408\u3084\u3001AWS\u4e0a\u3067\u306e\u5927\u898f\u6a21\u306a\u969c\u5bb3\u304c\u767a\u751f\u3059\u308b\u3068\u6570\u4e07\u5358\u4f4d\u3067\u306e\u5927\u91cf\u306e\u30a2\u30e9\u30fc\u30c8\u304c\u767a\u751f\u3057\u3001\u30ef\u30fc\u30ab\u30fc\u306e\u51e6\u7406\u304c\u8ffd\u3044\u3064\u304b\u306a\u3044\u3068\u30ad\u30e5\u30fc\u306b\u6e9c\u307e\u3063\u3066\u3057\u307e\u3044\u3001\u7d50\u679c\u9045\u5ef6\u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u57fa\u672c\u7684\u306b\u30ef\u30fc\u30ab\u30fc\u306e\u5897\u8a2d\u3067\u51e6\u7406\u80fd\u529b\u3092\u4e0a\u3052\u3066\u5bfe\u5fdc\u3059\u308b\u306e\u3067\u3059\u304c\u3001\u5f53\u521d\u306fCloudWatch\u30a2\u30e9\u30fc\u30e0\u3067\u691c\u77e5\u3057\u3001\u4eba\u529b\u3067\u30ef\u30fc\u30ab\u30fc\u306e\u8ffd\u52a0\u306a\u3069\u3092\u884c\u3046\u3053\u3068\u3067\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u73fe\u5728\u306f<a href=\"http:\/\/labs.gree.jp\/blog\/2016\/06\/16044\/\">\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30ea\u30f3\u30b0\u306e\u4ed5\u7d44\u307f<\/a>\u3092\u5c0e\u5165\u3057\u3001\u30ad\u30e5\u30fc\u304c\u6e9c\u307e\u308a\u306f\u3058\u3081\u305f\u3053\u3068\u3092\u30c8\u30ea\u30ac\u30fc\u3068\u3057\u3066\u52d5\u7684\u306b\u51e6\u7406\u304c\u8ffd\u3044\u3064\u304f\u307e\u3067\u30b9\u30b1\u30fc\u30eb\u3055\u305b\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u4eba\u529b\u3067\u306e\u5bfe\u5fdc\u3092\u884c\u308f\u305a\u306b\u634c\u3051\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h2><a id=\"user-content-\u307e\u3068\u3081\" class=\"anchor\" href=\"https:\/\/gist.github.com\/egmc\/e2fa51a75c2873a8e350eaa75cc52d4d#\u307e\u3068\u3081\"><\/a>\u307e\u3068\u3081<\/h2>\n<p>AWS\u306e\u30de\u30cd\u30fc\u30b8\u30c9\u30b5\u30fc\u30d3\u30b9\u3092\u6d3b\u7528\u3057\u3064\u3064\u3001\u30a2\u30e9\u30fc\u30c8\u306e\u901a\u77e5\u30b7\u30b9\u30c6\u30e0\u3068\u3044\u3046\u9ad8\u53ef\u7528\u6027\u304c\u6c42\u3081\u3089\u308c\u308b\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3057\u3001\u904b\u7528\u3057\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u5f53\u7136\u30de\u30cd\u30fc\u30b8\u30c9\u30b5\u30fc\u30d3\u30b9\u3082\u843d\u3061\u307e\u3059\u3057\u3001\u4e07\u80fd\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u843d\u3061\u305f\u5834\u5408\u306e\u5fa9\u65e7\u304c\u65e9\u304f\u81ea\u52d5\u5316\u3055\u308c\u3066\u3044\u308b\u3001\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u7684\u306b\u7279\u5b9a\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u4f9d\u5b58\u3057\u3066\u3044\u306a\u3044\u3001\u306a\u3069\u306e\u7279\u6027\u3092\u6d3b\u304b\u3057\u305d\u308c\u306a\u308a\u306b\u53ef\u7528\u6027\u306e\u9ad8\u3044\u30b5\u30fc\u30d3\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u304c\u5bb9\u6613\u306b\u5b9f\u73fe\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>AWS\u306e\u30b5\u30fc\u30d3\u30b9\u306f\u65e5\u3005\u9032\u6b69\u3057\u3066\u3044\u308b\u306e\u3067\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3082\u5909\u308f\u3063\u3066\u3044\u304d\u307e\u3059\u304c\u3001\u3053\u3061\u3089\u3082\u4e00\u3064\u306e\u4e8b\u4f8b\u3068\u3057\u3066\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5e78\u3044\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30a4\u30f3\u30d5\u30e9\u306e\u3044\u308f\u307b\u308a\uff08@egmc\uff09\u3067\u3059\u3002 \u30b5\u30fc\u30d0\u76e3\u8996\u3092\u69cb\u6210\u3059\u308b\u30b7\u30b9\u30c6\u30e0\u306f\u8272\u3005\u3042\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u306fAWS\u74b0\u5883\u4e0a\u3067\u306e\u76e3\u8996\u306b\u4f7f\u308f\u308c\u3066\u3044\u308b\u30a2\u30e9\u30fc\u30c8\u901a\u77e5\u306e\u4ed5\u7d44\u307f\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3055\u305b\u3066\u9802\u304d\u307e\u3059\u3002 \u76e3\u8996\u30b7\u30b9\u30c6\u30e0\u306e\u69cb\u7bc9\u305d\u306e\u3082\u306e\u306f2015\u5e74\u9803\u3001A [&hellip;]<\/p>\n","protected":false},"author":164,"featured_media":16498,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[114,125,22],"class_list":["post-16483","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-info","tag-aws","tag-sqs","tag-22"],"jetpack_featured_media_url":"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/05\/yusura-structure-1.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/16483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/164"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=16483"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/16483\/revisions"}],"predecessor-version":[{"id":16517,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/16483\/revisions\/16517"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media\/16498"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=16483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=16483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=16483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}