Amazon SQS / SWF / Data Pipeline / AWS Lambdaã®ç´¹ä» Amazon SQSã使ãä¸ã§ãã£ã¦ããã¹ãç¹å¾´ã¨å¯¾çï¼è»½ãï¼
丹å ã§ãã æ²é¡ã®ã¨ãããSQSãç°¡åã«ä½¿ããã¨ãã§ããshoryuken gemã使ã£ã¦ã¿ã¾ããã åæ ruby 2.2.4 rails 4.2.5 ããã¸ã¡ã³ãã³ã³ã½ã¼ã«ã§SQSã®ä½æ AWSããã¸ã¡ã³ãã³ã³ã½ã¼ã«ã®SQSç»é¢ããæ°è¦ã«ãã¥ã¼ãä½æãã¾ãã Shoryukenã«ããè² è·ãæãããããããReceive Message Wait Timeã®è¨å®ãå¿ããªãããã«ãã¦ãã ããã ã¤ã³ã¹ãã¼ã« Gemfileã«ä»¥ä¸ã®ããã«æ¸ãã¦bundle installãã¾ãã gem 'shoryuken' group :development, :test do gem 'foreman' end ãã¨ã§è§£èª¬ãã¾ãããrailsã¢ããªã¨ã¯å¥ã«workerããã»ã¹ãç«ã¡ä¸ããã®ã§ã便å©ã«ãªãããforemn gemãã¤ã³ã¹ãã¼ã«ãã¦ãã¾ãã Jobã¯ã©ã¹ãä½æ Shoryuken::Wo
ããè¨ç·´ãããã¢ããã«ä¿¡è ãé½å ã§ããAWSã§ã·ã¹ãã æ§ç¯ãããå ´åã¯ãDesign for failureã¨ããèãã«åºãã¦ãè¤æ°AZã«ã¾ãããå½¢ã®åé·æ§æãçµãã®ããã¹ããã©ã¯ãã£ã¹ã§ããããã«ããã®ããã«åæ£ãããåã¤ã³ã¹ã¿ã³ã¹ã«ã¯ãåºæ¥ãéããã¹ã¿ã¼ãä½ããªããã¤ã¾ãSPOFã¨ãªãã¤ã³ã¹ã¿ã³ã¹ãé¿ããæ§æã§ããã®ãçæ³ã§ãã ã¨ãã話é¡ã«ã¤ãã¦ã¯ä»¥åAWSã«ãããå¯ç¨æ§ã®èãæ¹ã¨ããã¨ã³ããªã¼ã§ãæ¸ãã¾ããã å¯ç¨æ§ (availability) ã¨æ¡å¼µæ§ (scalability) æ¬é¡ã¯ã¸ã§ãWorkerã§ãããWebãµã¼ããDBãµã¼ãã®å¯ç¨æ§ã¨æ¡å¼µæ§ãå ã«ãããããã¦ããã¾ãããã Webãµã¼ã ãã®èãã§æ§ç¯ããæãåºæ¬çãªæ§æããWebã·ã¹ãã ã«ããã ELB + Webãµã¼ã ã®æ§æã§ãããã®æ§æãã«ãAZã¨å¼ã³ãçæ¹ã®AZã丸ãã¨ãã¦ã³ããã¨ãã¦ãããµã¼ãã¹èªä½ã¯ãã¦
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}