Cãã¼ã¹ã®gRPCãµã¼ããgraceful restartããããã£ãä¸ã¤ã®å´ããããæ¹
ãã£ãä¸ã¤ãã©ããã¯ç¥ãããã©ããã¾ãã¨ããããããã§ããããã¿ãããªæ¹æ³ã
ãCãã¼ã¹ã®gRPCãµã¼ããã¨ã¯ä½ããã£ã¦ããã¨ãgRPCã®å®è£ ã¯Cè¨èªãã¼ã¹ã®å®è£ ã»golangå®è£ ã»Javaå®è£ ã«åããã¦ããã£ã½ãã¦ãããããRubyã¨ãPythonã¨ãã®LLã«ãããgRPC Serverã¯ãåè¨èªã®ã©ã¤ãã©ãª => åè¨èªã®Cè¨èªãã¤ã³ãã£ã³ã° => Cã§æ¸ãããã³ã¢ãã¨ããæ§æã«ãªã£ã¦ããã£ã½ããæ©ã話ããgoã¨Java以å¤ã§ã¯Cãã¼ã¹ã®å®è£ ã使ã£ã¦ãããã¨ã«ãªãã
ã§ãããç¨åº¦çé¢ç®ã«Ruby / gRPCã§æ¸ãããAPIãµã¼ããéç¨ãããã¨ããã«ããã£ã¦ãããã©ããã£ã¦graceful restartãããããªãã¨æã£ãããã§ããã
ä»ã¾ã§åãgraceful restartãããæ¹æ³ã¨ããã°ã
- Unicornã¨ãNginxã¨ãããµã¼ãã¢ããªã±ã¼ã·ã§ã³èªä½ãgraceful restartãå®è£ ãã¦ããã®ã§ããã«ä¹ã£ãã
- H2Oã¨ãRhebokã¨ããserver-starterçµç±ã§graceful restartã§ãããµã¼ãã¢ããªã±ã¼ã·ã§ã³ã使ã
ã®ã©ã£ã¡ããããã£ã¦ããªãã£ãããã§ãããgRPC Serverã¯å°ãªãã¨ã1ã§ã¯ãªãããã§ããã2ã®ããã«ã³ã¼ãã«æãå ¥ããã®ããªãã ããªãã¨ããæãã ã£ãã®ã§ãã©ãããããããªããã¨æããªããgRPCã®Cã®ã½ã¼ã¹ãçºããã¦ããããã§ãã
ãããããã¢ã¬ã§ããã¢ã¬ããªãã¨Cãã¼ã¹ã®gRPCãµã¼ãã¯ããã©ã«ãã§SO_REUSEPORTãæå¹ã«ãªã£ã¦ããã§ããããã£ãï¼ãããï¼ã¨ãããã¨ã§è¶ ææããªgraceful restartã®å®ç¾æ¹æ³ããã¡ã
- æ°ãµã¼ããç«ã¡ä¸ãã (åãportãlistenãã¦ãæ»ãªãªãããªããªãREUSEPORTãå¹ãã¦ããããªï¼)
- æ«ãå¾ ã¤
- æ§ãµã¼ãã殺ã
Great.
ãã ããã®æ¹æ³ã«ã¯æãããªåé¡ããã£ã¦ãããæ°ãµã¼ããç«ã¡ä¸ããã®ã«å¤±æããå ´åã¯çæ»ãã¦ãã¾ããããã¯æ°ãµã¼ãã®ç«ã¡ä¸ãããã¡ããã¨ç¢ºèªãã¦ããæ§ãµã¼ãã殺ãããã«ããã°ããã ããã
ã¤ãããã¯graceful restartãªãã¦ãããã«Blue / Greenãªdeployãè¡ãã®ã主æµã ã£ããããã®ããã ãã©ãã¾ããããã人ã¯ããã ããã¨ãããã¨ã§ã