OpenStack Swiftãªããžã§ã¯ãã¹ãã¬ãŒãžã¢ãã«
OpenStack Swiftãªããžã§ã¯ãã¹ãã¬ãŒãžã¢ãã«ã«ã¯ãããã€ãã®çµ±åããããšã³ãã£ãã£ãå«ãŸããŠããŸãã
- ãšã³ããŠãŒã¶ãŒããç¹å®ã®ããŒã¿ã»ãããåä¿¡ãããããã·ãµãŒããŒã¯ããªããžããªã®ä»ã®ã³ã³ããŒãã³ãã«ãµãŒãã¹ãªã¯ãšã¹ããå®è¡ããæçµçã«æ£ããçããçæããŠéä¿¡ããŸãã
- ã¢ã«ãŠã³ãããã³ã³ã³ãããµãŒããŒã ããã§ãããã2ã€ã®ãµãŒãã¹ãçµã¿åãããŸãã ååãšããŠéåžžã«äŒŒãŠããŸã-ãããããã¡ã¿ããŒã¿ãä¿åããã³ã³ããïŒã¢ã«ãŠã³ããµãŒããŒïŒãšãã¡ã€ã«ïŒã³ã³ãããŒãµãŒããŒïŒã®ãªã¹ããåå¥ã®sqlite-basesã«ä¿åãããªã¯ãšã¹ãã«å¿ããŠãã®ããŒã¿ãçºè¡ããŸãã
- ãªããžã§ã¯ããµãŒããŒãå®éã«ã¯ããŠãŒã¶ãŒãã¡ã€ã«ïŒããã³æ¡åŒµå±æ§ã®ãã¡ã€ã«ã¬ãã«ã¡ã¿ããŒã¿ïŒãä¿åããŸãã ããã¯æãåå§çãªæœè±¡åã¬ãã«ã§ããç¹å®ã®ããŒãã£ã·ã§ã³ã«æžã蟌ãŸãããªããžã§ã¯ãïŒãã¡ã€ã«åœ¢åŒïŒã®ã¿ããããŸãã
ãããã®åã³ã³ããŒãã³ãã¯åå¥ã®ããŒã¢ã³ã§ãã ãã¹ãŠã®ããŒã¢ã³ã¯ãã¯ã©ã¹ã¿å ã®ãªããžã§ã¯ãã®å Žæã決å®ããããã·ã¥ããŒãã«ãšåŒã°ãããªã³ã°ã䜿çšããŠãã¯ã©ã¹ã¿å ã§çµåãããŸãã ãªã³ã°ã¯å¥ã®ããã»ã¹ïŒãªã³ã°ãã«ããŒïŒã«ãã£ãŠäœæãããã¯ã©ã¹ã¿ãŒã®ãã¹ãŠã®ããŒãã«é åžãããŸãã ã¯ã©ã¹ã¿ãŒå ã®ãªããžã§ã¯ãã®ã¬ããªã«ã®æ°ãèšå®ããŠããã©ãŒã«ããã¬ã©ã³ã¹ïŒéåžžãç°ãªããªããžã§ã¯ãã«åãªããžã§ã¯ãã®3ã€ã®ã³ããŒãä¿åããããšããå§ãããŸãïŒãããŒãã£ã·ã§ã³ã®æ°ïŒSwiftã®å éšæ§é ïŒããŸãŒã³ããã³å°åããšã®ããã€ã¹ã®ååžãèšå®ããŸãã ãªã³ã°ã¯ãã¡ã€ã³ããã€ã¹ãå©çšã§ããªãå Žåã«ããŒã¿ã泚ããããããããã³ããªãããã€ã¹ã®ãªã¹ããæäŸããŸãã
ãã¹ãŠã®ã¹ãã¬ãŒãžã³ã³ããŒãã³ãã詳现ã«æ€èšããŠã¿ãŸãããã
ãããã·
æåã¯æšæºã®swift-proxyã䜿çšãããã®åŸãè² è·ãå¢å ããç¬èªã®ã³ãŒãã倧ãããªã£ããšãã«ãããããã¹ãŠgeventãšgunicornã«è»¢éã ãåŸã«gunicornãuwsgiã«çœ®ãæããŸããã ãããã®ãã¹ãŠã®ãœãªã¥ãŒã·ã§ã³ã¯ç¹ã«å¹æçã§ã¯ãªãããããã·ã«é¢é£ããåŸ ã¡æéã¯éåžžã«é·ããæ¿èªããããã©ãã£ãã¯ãåŠçããããã«ãŸããŸãå€ãã®ãµãŒããŒã䜿çšããå¿ èŠããããŸããã Pythonèªäœã¯éåžžã«é ãã§ãã ãã®çµæããã®ãã©ãã£ãã¯ã¯ãã¹ãŠ12å°ã®ãã·ã³ã§åŠçããå¿ èŠããããŸããïŒçŸåšããããªãã¯ãšãã©ã€ããŒãã®äž¡æ¹ã®ãã¹ãŠã®ãã©ãã£ãã¯ã¯3å°ã®ãµãŒããŒã§ã®ã¿åŠçãããŠããŸãïŒã
ããããã¹ãŠã®ç·©åæªçœ®ã®åŸããããã·ãµãŒããŒãæžãçŽããŸããã Hummingbirdãããžã§ã¯ãã®ãããã¿ã€ããããŒã¹ãšããŠããã¹ãŠã®ãŠãŒã¶ãŒæ©èœãå®è£ ããããã«ãŠã§ã¢ãè¿œå ããŸããããããã¯ãæ¿èªãå²ãåœãŠãéçãµã€ããã·ã³ããªãã¯ãªã³ã¯ã倧ããªã»ã°ã¡ã³ããªããžã§ã¯ãïŒåçããã³éçïŒãè¿œå ãã¡ã€ã³ãããŒãžã§ãã³ã°ãªã© ããã«ãããã€ãã®ç¹å¥ãªæ©èœãåäœããããã«ãåå¥ã®ãšã³ããã€ã³ããå®è£ ããŸãã-ããã¯ããã¡ã€ã³ãSSL蚌ææžãããã³ãµããŠãŒã¶ãŒã®ã»ããã¢ããã§ãã ããã«ãŠã§ã¢ãã§ãŒã³ã圢æããæ段ãšããŠããªã¯ãšã¹ãã³ã³ããã¹ã-gorilla / contextã«ã°ããŒãã«å€æ°ãæ ŒçŽããããã«ãjustinas / aliceïŒhttps://github.com/justinas/aliceïŒã䜿çšããŸã ã
OpenStack SwiftãµãŒãã¹ã«ãªã¯ãšã¹ããéä¿¡ããã«ã¯ãdirectclientã³ã³ããŒãã³ãã䜿çšãããŸããããã¯ããã¹ãŠã®ã¹ãã¬ãŒãžã³ã³ããŒãã³ããžã®å®å šãªã¢ã¯ã»ã¹æš©ãæã£ãŠããŸãã ç¹ã«ãã¢ã«ãŠã³ããã³ã³ããããªããžã§ã¯ãã®ã¬ãã«ã®ã¡ã¿ããŒã¿ã®ãã£ãã·ã¥ãç©æ¥µçã«äœ¿çšããŠããŸãã ãã®ã¡ã¿ããŒã¿ã¯ãªã¯ãšã¹ãã³ã³ããã¹ãã«å«ãŸããŸãã ãããã¯ããã以äžã®åŠçã決å®ããããã«å¿ èŠã§ãã ãªããžããªãžã®ãµãŒãã¹ãªã¯ãšã¹ããå€ãããªãããã«ããã®ããŒã¿ãmemcacheãã£ãã·ã¥ã«ä¿æããŸãã ãããã£ãŠããããã·ãµãŒããŒã¯ãªã¯ãšã¹ããåä¿¡ãããã®ã³ã³ããã¹ãã圢æããããŸããŸãªã¬ã€ã€ãŒïŒããã«ãŠã§ã¢ïŒãééããŸãããã®ãã¡ã®1ã€ã¯ããã®ãªã¯ãšã¹ãã¯ç§ã®ããã§ãïŒããšèšãå¿ èŠããããŸãã ãã®å±€ããªã¯ãšã¹ããåŠçãããŠãŒã¶ãŒã«åçãè¿ããŸãã
ã¹ãã¢ãžã®ãã¹ãŠã®ç¡èš±å¯ãªã¯ãšã¹ãã¯ãæåã«ãã£ãã·ã¥ãããã·ãééããŸãããã£ãã·ã¥ãããã·ã«ã¯ãApache TrafficserverãéžæããŸããã
æšæºã®ãã£ãã·ã¥ããªã·ãŒã¯ããã£ãã·ã¥å ã®ãªããžã§ã¯ãã®å Žæãããªãé·ãããšãæå³ããããïŒããã§ãªãå Žåããã£ãã·ã¥ã¯åœ¹ã«ç«ããªãïŒããã£ãã·ã¥ãã¯ãªã¢ããããã«å¥ã®ããŒã¢ã³ãäœæããŸããã ãããã·ããPUTèŠæ±ã€ãã³ããåä¿¡ããå€æŽããããªããžã§ã¯ãã®ãã¹ãŠã®ååã®ãã£ãã·ã¥ãã¯ãªã¢ããŸãïŒãªããžããªå ã®åãªããžã§ã¯ãã«ã¯å°ãªããšã2ã€ã®ååããããŸãïŒuserId.selcdn.ruããã³userId.selcdn.comããŠãŒã¶ãŒã¯ãã¡ã€ã³ãã³ã³ããã«æ·»ä»ããããšãã§ããŸãããã£ãã·ã¥ãã¯ãªã¢ããå¿ èŠããããŸãïŒã
ã¢ã«ãŠã³ããšã³ã³ãã
ãªããžããªå ã®ã¢ã«ãŠã³ãã¬ã€ã€ãŒã¯æ¬¡ã®ããã«ãªããŸãïŒåãŠãŒã¶ãŒã«å¯ŸããŠåå¥ã®sqliteããŒã¿ããŒã¹ãäœæãããã°ããŒãã«ã¡ã¿ããŒã¿ïŒã¢ã«ãŠã³ãã¯ã©ãŒã¿ãTempURLãªã©ã®ããŒïŒã®ã»ãããããã³ãã®ãŠãŒã¶ãŒã®ã³ã³ãããŒã®ãªã¹ããä¿åãããŸãã ãŠãŒã¶ãŒãããã®ã³ã³ããã®æ°ã¯æ°åååã§ã¯ãªããããããŒã¿ããŒã¹ã®ãµã€ãºã¯å°ãããããã«è€è£œãããŸãã
äžè¬çã«ãã¢ã«ãŠã³ãã¯åé¡ãªãæ©èœããåé¡ã¯ãããŸãããé²æ©çãªäººé¡ã¯çãããããæããŠããŸãã
ã³ã³ããã§ã¯ãç¶æ³ã¯ç°ãªããŸãã æè¡çãªèŠ³ç¹ããèŠããšããããã¯ãŸã£ããåãsqliteããŒã¹ã§ããããããã®ããŒã¿ããŒã¹ã«ã¯ã1人ã®ãŠãŒã¶ãŒã®ã³ã³ãããŒã®å°ããªãªã¹ãã§ã¯ãªããç¹å®ã®ã³ã³ãããŒã®ã¡ã¿ããŒã¿ãšãã®äžã®ãã¡ã€ã«ã®ãªã¹ããå«ãŸããŠããŸãã äžéšã®ã客æ§ã¯ã1ã€ã®ã³ã³ããã«æ倧1ååã®ãã¡ã€ã«ãä¿åããŠããŸãã ãã®ãããªå€§èŠæš¡ãªsqliteããŒã¿ããŒã¹ã®ã¯ãšãªã¯äœéã§ãããã¬ããªã±ãŒã·ã§ã³ïŒéåæã¬ã³ãŒãã®å¯çšæ§ãèæ ®ããå ŽåïŒã¯ã¯ããã«è€éã§ãã
ãã¡ãããã³ã³ããçšã®sqliteã¹ãã¬ãŒãžã¯äœãã§çœ®ãæããããšãã§ããŸã-ããããäœã§ïŒ MongoDBãšCassandraã«åºã¥ããŠã¢ã«ãŠã³ããµãŒããŒãšã³ã³ãããµãŒããŒã®ãã¹ãããŒãžã§ã³ãäœæããŸãããããã®ãããªãœãªã¥ãŒã·ã§ã³ã¯ãã¹ãŠãäžå€®éäžåããŒã¿ããŒã¹ã«ãçµã³ä»ãããããæ°Žå¹³ã¹ã±ãŒãªã³ã°ã®èŠ³ç¹ããã¯æåãšã¯èšããŸããã æéãšãšãã«ã¯ã©ã€ã¢ã³ããšãã¡ã€ã«ãå¢ããŠãããããæ°ååã®ã¬ã³ãŒããæã€1ã€ã®å·šå€§ãªããŒã¿ããŒã¹ã䜿çšããããããå€æ°ã®å°ããªããŒã¿ããŒã¹ã«ããŒã¿ãä¿åããæ¹ãæãŸãããšæãããŸãã
èªåã³ã³ããã·ã£ãŒãã£ã³ã°ãå®è£ ããããšã¯äžå¿ èŠã§ã¯ãããŸããã巚倧ãªã³ã³ãããããã€ãã®sqliteããŒã¹ã«åå²ããæ©äŒãããã°ãäžè¬çã«çŽ æŽãããããšã§ãã
ã·ã£ãŒãã£ã³ã°ã®è©³çŽ°ã«ã€ããŠã¯ã ãã¡ããã芧ãã ãã ã ã芧ã®ãšããããã¹ãŠãé²è¡äžã§ãã
ã³ã³ãããµãŒããŒã«çŽæ¥é¢é£ãããã1ã€ã®æ©èœã¯ããªããžã§ã¯ãã®æå¹æéãå¶éããããšã§ãã X-Delete-AtãŸãã¯X-Delete-AfterããããŒã䜿çšããŠããªããžã§ã¯ãã¹ãã¬ãŒãžãªããžã§ã¯ããåé€ããããŸã§ã®æéãèšå®ã§ããŸãã ãããã®ããããŒã¯ããªããžã§ã¯ãã®äœææïŒPUTèŠæ±ïŒããŸãã¯ã¡ã¿ããŒã¿ã®å€æŽæïŒPOSTèŠæ±ïŒã«çããéä¿¡ã§ããŸãã ãã ãããã®ããã»ã¹ã®çŸåšã®å®è£ ã¯ãç§ãã¡ãæãã»ã©è¯ãèŠããŸããã å®éãæåã¯ãã®æ©èœã¯æ¢åã®OpenStack Swiftã€ã³ãã©ã¹ãã©ã¯ãã£ã«å¯ŸããŠå¯èœãªéãå°ãªãä¿®æ£ãå ãããããªæ¹æ³ã§å®è£ ãããŠããŸããã ãããŠãããã§ã¯æãç°¡åãªæ¹æ³ã§é²ããŸãããæå¹æéãéãããŠãããã¹ãŠã®ãªããžã§ã¯ãã®ã¢ãã¬ã¹ãç¹å¥ãªã.expiring_objectsãã¢ã«ãŠã³ãã«å ¥ããobject-expirerãšããå¥ã®ããŒã¢ã³ã䜿çšããŠãã®ã¢ã«ãŠã³ããå®æçã«è¡šç€ºããããšã«ããŸããã ãã®åŸãããã«2ã€ã®åé¡ããããŸããã
- æåã¯ãµãŒãã¹ã¢ã«ãŠã³ãã§ãã ããã§ãæå®ãããããããŒã®1ã€ãæã€ãªããžã§ã¯ãã«å¯ŸããŠPUT / POSTãªã¯ãšã¹ããè¡ããšãååãã¿ã€ã ã¹ã¿ã³ãïŒunixã¿ã€ã ã¹ã¿ã³ãïŒã§ãããã®ã¢ã«ãŠã³ãã«ã³ã³ãããäœæãããŸãã ãããã®ã³ã³ããã§ã¯ãã¿ã€ã ã¹ã¿ã³ã圢åŒã®ååãšã察å¿ããå®éã®ãªããžã§ã¯ããžã®ãã«ãã¹ã䜿çšããŠãæ¬äŒŒãªããžã§ã¯ããäœæãããŸãã ãããè¡ãã«ã¯ãã³ã³ãããµãŒããŒã«ã¢ã¯ã»ã¹ããŠããŒã¿ããŒã¹ã«ãšã³ããªãäœæããç¹å¥ãªé¢æ°ã䜿çšããŸãã ãªããžã§ã¯ããµãŒããŒã¯ãŸã£ããé¢äžããŸããã ãããã£ãŠããªããžã§ã¯ãã®ä¿åæéãå¶éããæ©èœãç©æ¥µçã«äœ¿çšãããšãã³ã³ãããµãŒããŒã®è² è·ãå€§å¹ ã«å¢å ããŸãã
- 2çªç®ã¯ãobject-expirerããŒã¢ã³ã«é¢é£ä»ããããŠããŸãã ãã®ããŒã¢ã³ã¯ãå®æçã«ç䌌ãªããžã§ã¯ãã®èšå€§ãªãªã¹ããééããã¿ã€ã ã¹ã¿ã³ãããã§ãã¯ããæéåãã®ãã¡ã€ã«ãåé€ããèŠæ±ãéä¿¡ããŸãã ãã®äž»ãªæ¬ ç¹ã¯ã極端ã«é ãé床ã§ãã ãã®ããããªããžã§ã¯ããå®éã«åé€ãããããšããããããŸãããã³ã³ããããŒã¿ããŒã¹å ã®å¯Ÿå¿ãããšã³ããªã¯ãŸã åé€ãããŠããªããããã³ã³ããã®ãªã¹ãã«è¡šç€ºãããŸãã
ç§ãã¡ã®å®è·µã§ã¯ãå žåçãªç¶æ³ã¯ã2åãè¶ ãããã¡ã€ã«ãåé€ãã¥ãŒã«ããããªããžã§ã¯ãæå¹æéããã®ã¿ã¹ã¯ã«å¯ŸåŠã§ããªãå Žåã§ãã ãããã£ãŠãGoã§èšè¿°ãããç¬èªã®ããŒã¢ã³ãäœæããå¿ èŠããããŸããã
ããªãé·ãéè°è«ãããŠãã解決çããããããã«å®è£ ãããããšãé¡ã£ãŠããŸãã
äœã§æ§æãããŠããŸããïŒ ã³ã³ããã¬ããªã±ãŒã¿ãæéåãã®ãã¡ã€ã«ãåé€ã§ããããã«ããè¿œå ã®ãã£ãŒã«ããã³ã³ããããŒã¿ããŒã¹ã¹ããŒãã«è¡šç€ºãããŸãã ããã«ãããæ¢ã«åé€ããããªããžã§ã¯ãã«é¢ããã¬ã³ãŒãã®ã³ã³ããããŒã¿ããŒã¹å ã®ååšã«é¢ããåé¡ã解決ããããªããžã§ã¯ãç£æ»ã¯æéåããªããžã§ã¯ãã®ãã¡ã€ã«ãåé€ããŸãã ããã«ããããªããžã§ã¯ãæå¹æéãå®å šã«æŸæ£ããããšãã§ããŸããçŸæç¹ã§ã¯ããã«ãã¢ã¹ã¯ã¯ãšåãã¢ã¿ããºã ã§ãã
ãªããžã§ã¯ã
æ©èœã¬ãã«ã¯ãOpenStack Swiftã®æãç°¡åãªéšåã§ãã ãã®ã¬ãã«ã§ã¯ããªããžã§ã¯ãïŒãã¡ã€ã«ïŒã®ãã€ãã»ãããšããããã®ãã¡ã€ã«ã«å¯Ÿããç¹å®ã®æäœã»ããïŒæžã蟌ã¿ãèªã¿åããåé€ïŒã®ã¿ããããŸãã ãªããžã§ã¯ããæäœããã«ã¯ãããŒã¢ã³ã®æšæºã»ããã䜿çšãããŸãã
- ãªããžã§ã¯ãã®ãµãŒããŒïŒãªããžã§ã¯ããµãŒããŒïŒ-ãããã·ãµãŒããŒããèŠæ±ãåä¿¡ããå®éã®ãã¡ã€ã«ã·ã¹ãã ã®ãªããžã§ã¯ããé 眮/æäŸããŸãã
- ãªããžã§ã¯ãã¬ããªã±ãŒã¿ãŒïŒãªããžã§ã¯ãã¬ããªã±ãŒã¿ãŒïŒ-rsyncã®äžã«ã¬ããªã±ãŒã·ã§ã³ã®ããžãã¯ãå®è£ ããŸãã
- ãªããžã§ã¯ãç£æ»ïŒãªããžã§ã¯ãç£æ»ïŒ-ãªããžã§ã¯ããšãã®å±æ§ã®æŽåæ§ããã§ãã¯ããç Žæãããªããžã§ã¯ããéé¢ããŠãã¬ããªã±ãŒã¿ãŒãå¥ã®ãœãŒã¹ããæ£ããã³ããŒã埩å ã§ããããã«ããŸãã
- ä¿®æ£ããã°ã©ã ïŒãªããžã§ã¯ãæŽæ°ããã°ã©ã ïŒ-ã¢ã«ãŠã³ãããã³ã³ã³ããã®ããŒã¿ããŒã¹ãæŽæ°ããé 延æäœãå®è¡ããããã«èšèšãããŠããŸãã ãã®ãããªæäœã¯ãããšãã°ãsqliteããŒã¿ããŒã¹ã®ãããã¯ã«é¢é£ããã¿ã€ã ã¢ãŠããåå ã§çºçããå ŽåããããŸãã
ãšãŠãã·ã³ãã«ã«èŠããŸãããïŒ ãã ãããã®ã¬ã€ã€ãŒã«ã¯ããªãªãŒã¹ãããªãªãŒã¹ãžãšç§»è¡ããããã€ãã®éèŠãªåé¡ããããŸãã
- rsyncäžã§ã®ãªããžã§ã¯ãã®è€è£œãéåžžã«é ãïŒéåžžã«é ãïŒã å°ããªã¯ã©ã¹ã¿ãŒã§ããã«èããããšãã§ããå Žåãæ°åååã®ãªããžã§ã¯ãã«å°éããåŸããã¹ãŠãéåžžã«æ²ããããã«èŠããŸãã Rsyncã¯ãããã·ã¥ã¬ããªã±ãŒã·ã§ã³ã¢ãã«ãæ³å®ããŠããŸãããªããžã§ã¯ãã¬ããªã±ãŒã·ã§ã³ãµãŒãã¹ã¯ããã®ããŒãäžã®ãã¡ã€ã«ã調ã¹ããã®ãã¡ã€ã«ãããã¯ãã®ä»ã®ãã¹ãŠã®ããŒãã«ãããã®ãã¡ã€ã«ãããã·ã¥ããããšããŸãã ããã¯ãã¯ãããã»ã©åçŽãªããã»ã¹ã§ã¯ãããŸãããç¹ã«ãããã©ãŒãã³ã¹ãåäžãããããã«ããŒãã£ã·ã§ã³ã®è¿œå ããã·ã¥ã䜿çšãããŸãã ãã®ãã¹ãŠã®è©³çŽ°ã«ã€ããŠã¯ã ãã¡ããã芧ãã ããã
- ãªããžã§ã¯ããµãŒããŒã®å®æçãªåé¡ããã£ã¹ã¯ã®1ã€ã§I / Oæäœããã³ã°ãããšãã«ç°¡åã«ãããã¯ã§ããŸãã ããã¯ããªã¯ãšã¹ããžã®å¿çæéã®æ¥æ¿ãªå¢å ã«çŸããŸãã ãªããããèµ·ãã£ãŠããã®ã§ããïŒ å€§èŠæš¡ãªã¯ã©ã¹ã¿ãŒã§ã¯ãå®å šã«ãã¹ãŠã®ãµãŒããŒãå®è¡ããããã¹ãŠã®ãã£ã¹ã¯ãããŠã³ãããããã¹ãŠã®ãã¡ã€ã«ã·ã¹ãã ãã¢ã¯ã»ã¹å¯èœãªçæ³çãªç¶æ³ãåžžã«éæã§ãããšã¯éããŸããã ãªããžã§ã¯ããµãŒããŒå ã®ãã£ã¹ã¯ã¯å®æçã«ããã³ã°ãããŸãïŒãªããžã§ã¯ãã«ã¯å°ããªiopså¶éã®ããéåžžã®hddã䜿çšãããŸãïŒã æšæºã®ãªããžã§ã¯ããµãŒããŒã«ã¯ãæäœãåäžã®ãã£ã¹ã¯ã«åé¢ããã¡ã«ããºã ããããŸããã ããã«ãããç¹ã«å€æ°ã®ã¿ã€ã ã¢ãŠããçºçããŸãã
幞ããªããšã«ãSwiftã®ä»£æ¿ãæè¿ç»å ŽããŸãããããã«ãããäžèšã®åé¡ããã¹ãŠå¹æçã«è§£æ±ºã§ããŸãã ããã¯äžã§è¿°ã¹ãããã³ã°ããŒããšåãã§ãã 次ã®ã»ã¯ã·ã§ã³ã§ã¯ãããã«ã€ããŠããã«è©³ãã説æããŸãã
Swiftã®åé¡ã解決ããè©Šã¿ãšããŠã®ããããª
æè¿ãRackspaceã¯OpenStack Swiftã®æ¹è¯ãšGoã§ã®æžãçŽãã®äœæ¥ãéå§ããŸããã ããã¯ããµãŒããŒãã¬ããªã±ãŒã¿ãŒããªãŒãã£ã¿ãŒãªã©ãããã«äœ¿çšã§ãããªããžã§ã¯ãã®ã¬ã€ã€ãŒã§ãã ã¹ãã¬ãŒãžããªã·ãŒã¯ãŸã ãµããŒããããŠããŸããããã¹ãã¬ãŒãžã§ã¯äœ¿çšãããŠããŸããã ãªããžã§ã¯ãã«é¢é£ä»ããããããŒã¢ã³ã«ã¯ãã³ã¬ã¯ã¿ãŒïŒãªããžã§ã¯ãæŽæ°ããã°ã©ã ïŒã ãããããŸããã
äžè¬ã«ãhummingbirdã¯å ¬åŒã®OpenStackãªããžããªã®æ©èœãã©ã³ãã§ãããã®ãããžã§ã¯ãã¯çŸåšæŽ»çºã«éçºãããŠããããŸããªããã¹ã¿ãŒïŒããããïŒã«å«ãŸããŸããéçºã«åå ã§ããŸã-github.com/openstack/swift/tree/feature/hummingbird ã
ããã³ã°ããŒããã¹ãŠã£ãããããåªããŠããã®ã¯ãªãã§ããïŒ
ãŸããHummingbirdã®ã¬ããªã±ãŒã·ã§ã³ããžãã¯ãå€æŽãããŸããã ã¬ããªã±ãŒã¿ãŒã¯ãããŒã«ã«ãã¡ã€ã«ã·ã¹ãã å ã®ãã¹ãŠã®ãã¡ã€ã«ããã€ãã¹ãããã¹ãŠã®ããŒãã«èŠæ±ãéä¿¡ããŸãïŒããããå¿ èŠã§ããïŒãïŒãã®ãããªèŠæ±ã®ã«ãŒãã£ã³ã°ãç°¡çŽ åããããã«ãREPCONNã¡ãœããã䜿çšãããŸãïŒã å¿çã«æ°ããããŒãžã§ã³ã®ãã¡ã€ã«ããããšèšãããå ŽåãããŒã«ã«ãã¡ã€ã«ã¯åé€ãããŸãã ãã®ãã¡ã€ã«ãã©ããã§æ¬ èœããŠããå Žåãæ¬ èœããã³ããŒãäœæãããŸãã ãã¡ã€ã«ãæ¢ã«åé€ãããŠãããæ°ããã¿ã€ã ã¹ã¿ã³ããæã€å»æ£ãã¡ã€ã«ãã©ããã§èŠã€ãã£ãå ŽåãããŒã«ã«ãã¡ã€ã«ã¯ããã«åé€ãããŸãã
ããã§ã¯ãå»æ£ãã¡ã€ã«ãšã¯äœãã説æããå¿ èŠããããŸãã ããã¯ãåé€ããããšãã«ãªããžã§ã¯ãã®å Žæã«é 眮ããã空ã®ãã¡ã€ã«ã§ãã
ãªããã®ãããªãã¡ã€ã«ãå¿ èŠãªã®ã§ããïŒ å€§èŠæš¡ãªåæ£ã¹ãã¬ãŒãžã®å ŽåãDELETEèŠæ±ãéä¿¡ãããšãã«ããªããžã§ã¯ãã®ãã¹ãŠã®ã³ããŒãããã«åé€ãããããšãä¿èšŒã§ããŸããããã®çš®ã®æäœã§ã¯ãnåã®èŠæ±ãåä¿¡ããåŸã®æ£åžžãªåé€ã«é¢ããå¿çããŠãŒã¶ãŒã«éä¿¡ããããã§ãïŒnã¯ã¯ã©ãŒã©ã ã«å¯Ÿå¿ïŒ 3ã³ããŒã®å Žå-2ã€ã®åçãåŸãããŸãïŒã äžéšã®ããã€ã¹ã¯ããŸããŸãªçç±ã§äœ¿çšã§ããªãå ŽåãããããïŒããšãã°ãæ©åšã®ã¹ã±ãžã¥ãŒã«ãããäœæ¥ïŒãããã¯æå³çã«è¡ãããŸãã åœç¶ããããã®ããã€ã¹äžã®ãã¡ã€ã«ã®ã³ããŒã¯åé€ãããŸããã
ããã«ãããã€ã¹ãã¯ã©ã¹ã¿ãŒã«æ»ã£ãåŸããã¡ã€ã«ã¯äœ¿çšå¯èœã«ãªããŸãã ãããã£ãŠãåé€ãããšããªããžã§ã¯ãã¯ååã«çŸåšã®ã¿ã€ã ã¹ã¿ã³ããæã€ç©ºã®ãã¡ã€ã«ã«çœ®ãæããããŸãã ãµãŒããŒã®ããŒãªã³ã°äžã«ãã¬ããªã±ãŒã¿ãŒã2ã€ã®ãã¥ãŒã ã¹ããŒã³ãã¡ã€ã«ãæ€åºããæ°ããã¿ã€ã ã¹ã¿ã³ããšããã¡ã€ã«ã®1ã€ã®ã³ããŒã«å€ãæçµå€æŽãããå Žåã§ãããªããžã§ã¯ãã¯åé€ãããŠãããæ®ãã®ã³ããŒãåé€ããå¿ èŠããããŸãã
ãªããžã§ã¯ããµãŒããŒã®å Žåãåãã§ãããã£ã¹ã¯ã¯åé¢ãããŠããããã£ã¹ã¯ãžã®ç«¶åæ¥ç¶ãå¶éããã»ããã©ããããŸãã äœããã®çç±ã§ãã£ã¹ã¯ããªã¯ãšã¹ããã¥ãŒããããªãŒãºããŸãã¯ãªãŒããŒãããŒããå Žåãåã«å¥ã®ããŒãã«ç§»åã§ããŸãã
Hummingbirdãããžã§ã¯ãã¯æ£åžžã«éçºãããŠããŸãã ããã«å ¬åŒã«OpenStackã«å«ãŸããããšãæåŸ ããŸãããã
ã¯ã©ãŠãã¹ãã¬ãŒãžã¯ã©ã¹ã¿ãŒå šäœãHummingbirdã«ã¢ããã°ã¬ãŒãããŸããã ããã«ããããªããžã§ã¯ãã®ãµãŒããŒããã®å¿çã®å¹³ååŸ æ©æéãæžå°ãããšã©ãŒãã¯ããã«å°ãªããªããŸããã äžèšã®ããã«ãHummingbirdã®ãããã¿ã€ãã«åºã¥ããŠç¬èªã®ãããã·ãµãŒããŒã䜿çšããŸãã æ©èœå±€ãHummingbirdã®ããŒã¢ã³ã®ã»ããã«çœ®ãæããããŸããã
æšæºã®OpenStack Swiftã®ã³ã³ããŒãã³ãã®ãã¡ãã¢ã«ãŠã³ããšã³ã³ããã®ã¬ã€ã€ãŒã«é¢é£ä»ããããŠããããŒã¢ã³ã ãã§ãªããããŒã¢ã³ä¿®æ£ããã°ã©ã ïŒãªããžã§ã¯ãæŽæ°ããã°ã©ã ïŒã䜿çšãããŸãã
ãããã«
ãã®èšäºã§ã¯ãããã³ã°ããŒããšããã®å©ããåããŠè§£æ±ºã§ããåé¡ã«ã€ããŠèª¬æããŸããã ã質åãããã°ãã³ã¡ã³ãã§ãçãããŸãã
æ°ãããã©ãããã©ãŒã ãžã®ç§»è¡ã®ãããã§ãã¹ãã¬ãŒãžAPIã®æ©èœç¯å²ãå€§å¹ ã«æ¡å€§ããããšãã§ããŸããã ãŠãŒã¶ãŒç®¡çããã¡ã€ã³ãSSL蚌ææžãªã©ã®æ°æ©èœãç»å ŽããŸããã è¿ãå°æ¥ãæŽæ°ãããAPIã®ããã¥ã¡ã³ããã³ã³ãããŒã«ããã«ã«æ²èŒãããã¹ãŠã®é©æ°ã«ã€ããŠè©³ããã¯å¥ã®èšäºã§èª¬æããŸãã