{"id":479420,"date":"2023-08-09T10:39:54","date_gmt":"2023-08-09T10:39:54","guid":{"rendered":""},"modified":"2023-09-05T11:18:47","modified_gmt":"2023-09-05T11:18:47","slug":"two-phase-commit","status":"publish","type":"wiki","link":"https:\/\/oneproxy.pro\/kr\/wiki\/two-phase-commit\/","title":{"rendered":"2\ub2e8\uacc4 \ucee4\ubc0b"},"content":{"rendered":"<p>2PC(2\ub2e8\uacc4 \ucee4\ubc0b)\ub294 \uc5ec\ub7ec \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ub610\ub294 \ub9ac\uc18c\uc2a4\uc5d0\uc11c \ud2b8\ub79c\uc7ad\uc158\uc758 \uc77c\uad00\uc131\uc744 \ubcf4\uc7a5\ud558\uae30 \uc704\ud574 \ucef4\ud4e8\ud130 \uacfc\ud559\uc5d0\uc11c \uc0ac\uc6a9\ub418\ub294 \ubd84\uc0b0 \uc54c\uace0\ub9ac\uc998\uc785\ub2c8\ub2e4. \ucc38\uc5ec\ud558\ub294 \ubaa8\ub4e0 \ub178\ub4dc\uac00 \ud2b8\ub79c\uc7ad\uc158\uc5d0 \ucc38\uc5ec\ud558\uac70\ub098 \uc5b4\ub290 \ub178\ub4dc\ub3c4 \uc218\ud589\ud558\uc9c0 \uc54a\ub3c4\ub85d \ubcf4\uc7a5\ud558\uc5ec \ub370\uc774\ud130 \ubb34\uacb0\uc131\uc744 \uc720\uc9c0\ud558\uace0 \ubd84\uc0b0 \uc2dc\uc2a4\ud15c\uc758 \ubd88\uc77c\uce58\ub97c \ubc29\uc9c0\ud569\ub2c8\ub2e4.<\/p>\n<h2>Two-phase \ucee4\ubc0b\uc758 \uc720\ub798\uc640 \ucd5c\ucd08 \uc5b8\uae09\uc758 \uc5ed\uc0ac<\/h2>\n<p>2\ub2e8\uacc4 \ucee4\ubc0b\uc758 \uac1c\ub150\uc740 1974\ub144 EW Dijkstra\uac00 &quot;\ub3d9\uc2dc \ud504\ub85c\uadf8\ub798\ubc0d \uc81c\uc5b4\uc758 \ubb38\uc81c \ud574\uacb0&quot;\uc774\ub77c\ub294 \uc81c\ubaa9\uc758 \ub17c\ubb38\uc5d0\uc11c \ucc98\uc74c \uc18c\uac1c\ud588\uc2b5\ub2c8\ub2e4. \ub098\uc911\uc5d0 1981\ub144 Jim Gray\uc640 Andreas Reuter\uac00 \uc601\ud5a5\ub825 \uc788\ub294 \ub17c\ubb38 &quot;\ud2b8\ub79c\uc7ad\uc158 \ucc98\ub9ac: \uac1c\ub150 \ubc0f \uae30\uc220&quot;\uc5d0\uc11c 2\ub2e8\uacc4 \ucee4\ubc0b \ud504\ub85c\ud1a0\ucf5c\uc744 \uacf5\uc2dd\uc801\uc73c\ub85c \uc124\uba85\ud588\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>2\ub2e8\uacc4 \ucee4\ubc0b\uc5d0 \ub300\ud55c \uc790\uc138\ud55c \uc815\ubcf4<\/h2>\n<p>2\ub2e8\uacc4 \ucee4\ubc0b\uc740 \uc5ec\ub7ec \ub178\ub4dc \ub610\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uac00 \uad00\ub828\ub41c \ubd84\uc0b0 \ud2b8\ub79c\uc7ad\uc158\uc744 \uad00\ub9ac\ud558\ub3c4\ub85d \uc124\uacc4\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \ubaa8\ub4e0 \ub178\ub4dc\uac00 \ud2b8\ub79c\uc7ad\uc158\uc744 \ucee4\ubc0b\ud560\uc9c0 \uc544\ub2c8\uba74 \uc911\ub2e8\ud560\uc9c0\uc5d0 \ub300\ud574 \ub3d9\uc758\ud558\ub294\uc9c0 \ud655\uc778\ud558\ub294 \uac83\uc774 \uc911\uc694\ud569\ub2c8\ub2e4. \ud504\ub85c\ud1a0\ucf5c\uc740 \uc900\ube44 \ub2e8\uacc4\uc640 \ucee4\ubc0b \ub2e8\uacc4\uc758 \ub450 \ub2e8\uacc4\ub85c \uc791\ub3d9\ud569\ub2c8\ub2e4.<\/p>\n<p>\uc900\ube44 \ub2e8\uacc4\uc5d0\uc11c\ub294 \ub2e4\uc74c\uc744 \uc218\ud589\ud569\ub2c8\ub2e4.<\/p>\n<ol>\n<li>\ucf54\ub514\ub124\uc774\ud130 \ub178\ub4dc\ub294 \ubaa8\ub4e0 \ucc38\uc5ec \ub178\ub4dc\uc5d0 \uc900\ube44 \uc694\uccad\uc744 \ubcf4\ub0c5\ub2c8\ub2e4.<\/li>\n<li>\uac01 \ucc38\uac00\uc790\ub294 \ub3d9\uc758(YES) \ub610\ub294 \ub3d9\uc758\ud558\uc9c0 \uc54a\uc74c(NO)\uc73c\ub85c \uc751\ub2f5\ud569\ub2c8\ub2e4.<\/li>\n<li>\ucc38\uac00\uc790 \uc911 \ub3d9\uc758\ud558\uc9c0 \uc54a\ub294 \uacbd\uc6b0 \ucf54\ub514\ub124\uc774\ud130\ub294 \ubaa8\ub4e0 \ub178\ub4dc\uc5d0 \ud2b8\ub79c\uc7ad\uc158\uc744 \uc911\ub2e8\ud558\ub3c4\ub85d \uc9c0\uc2dc\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<p>\ucee4\ubc0b \ub2e8\uacc4\uc5d0\uc11c:<\/p>\n<ol>\n<li>\uc900\ube44 \ub2e8\uacc4\uc5d0\uc11c \ubaa8\ub4e0 \ucc38\uac00\uc790\uac00 \ub3d9\uc758(YES)\ud558\uba74 \ucf54\ub514\ub124\uc774\ud130\ub294 \ubaa8\ub4e0 \ub178\ub4dc\uc5d0 \ucee4\ubc0b \uc694\uccad\uc744 \ubcf4\ub0c5\ub2c8\ub2e4.<\/li>\n<li>\ucee4\ubc0b \uc694\uccad\uc744 \ubc1b\uc73c\uba74 \uac01 \ucc38\uac00\uc790\ub294 \ud544\uc694\ud55c \ubcc0\uacbd \uc0ac\ud56d\uc744 \uc601\uad6c\uc801\uc73c\ub85c \uc801\uc6a9\ud558\uc5ec \ud2b8\ub79c\uc7ad\uc158\uc744 \ub9c8\ubb34\ub9ac\ud569\ub2c8\ub2e4.<\/li>\n<li>\uc900\ube44 \ub2e8\uacc4\uc5d0\uc11c \ucc38\uac00\uc790 \uc911 \ub3d9\uc758\ud558\uc9c0 \uc54a\ub294 \ucc38\uac00\uc790(NO)\uac00 \uc788\uc73c\uba74 \ucf54\ub514\ub124\uc774\ud130\ub294 \ubaa8\ub4e0 \ub178\ub4dc\uc5d0 \uc911\ub2e8 \uc694\uccad\uc744 \ubcf4\ub0b4\uace0 \ud2b8\ub79c\uc7ad\uc158\uc740 \ub864\ubc31\ub429\ub2c8\ub2e4.<\/li>\n<\/ol>\n<h2>2\ub2e8\uacc4 \ucee4\ubc0b\uc758 \ub0b4\ubd80 \uad6c\uc870 \ubc0f \uc791\ub3d9 \ubc29\uc2dd<\/h2>\n<p>2\ub2e8\uacc4 \ucee4\ubc0b\uc5d0\ub294 \ub2e4\uc74c \uad6c\uc131 \uc694\uc18c\uac00 \ud3ec\ud568\ub429\ub2c8\ub2e4.<\/p>\n<ol>\n<li>\n<p><strong>\uc870\uc815\uc790<\/strong>: \uac70\ub798\ub97c \uc2dc\uc791\ud558\uace0 \uad00\ub9ac\ud558\ub294 \uc5ed\ud560\uc744 \ub2f4\ub2f9\ud569\ub2c8\ub2e4. \ucc38\uc5ec\ud558\ub294 \ubaa8\ub4e0 \ub178\ub4dc\uc640 \ud1b5\uc2e0\ud558\uace0 \uc751\ub2f5\uc5d0 \ub530\ub77c \ud2b8\ub79c\uc7ad\uc158\uc744 \ucee4\ubc0b\ud560\uc9c0 \uc544\ub2c8\uba74 \uc911\ub2e8\ud560\uc9c0 \uacb0\uc815\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\ucc38\uac00\uc790\ub4e4<\/strong>: \ud2b8\ub79c\uc7ad\uc158\uc5d0 \uad00\ub828\ub41c \ub178\ub4dc \ub610\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc785\ub2c8\ub2e4. \uc774\ub4e4\uc740 \ucf54\ub514\ub124\uc774\ud130\uc758 \uc900\ube44 \uc694\uccad\uc5d0 \ub3d9\uc758 \ub610\ub294 \ubd88\uc77c\uce58\ub85c \uc751\ub2f5\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\uac70\ub798 \ub85c\uadf8<\/strong>: \uac01 \ucc38\uac00\uc790\ub294 \ud2b8\ub79c\uc7ad\uc158 \uc911\uc5d0 \ubc1c\uc0dd\ud55c \ubaa8\ub4e0 \ubcc0\uacbd \uc0ac\ud56d\uc744 \uae30\ub85d\ud558\ub294 \ud2b8\ub79c\uc7ad\uc158 \ub85c\uadf8\ub97c \uc720\uc9c0 \uad00\ub9ac\ud569\ub2c8\ub2e4. \uc774 \ub85c\uadf8\ub294 \ud544\uc694\ud55c \uacbd\uc6b0 \ubcc0\uacbd \uc0ac\ud56d\uc744 \ub864\ubc31\ud560 \uc218 \uc788\ub3c4\ub85d \ub3c4\uc640\uc90d\ub2c8\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<p>\uc54c\uace0\ub9ac\uc998\uc740 \ub2e4\uc74c\uacfc \uac19\uc774 \uc9c4\ud589\ub429\ub2c8\ub2e4.<\/p>\n<ol>\n<li>\n<p>\ucf54\ub514\ub124\uc774\ud130\ub294 \ubaa8\ub4e0 \ucc38\uac00\uc790\uc5d0\uac8c \uc900\ube44 \uc694\uccad\uc744 \ubcf4\ub0b4 \uc900\ube44 \ub2e8\uacc4\ub97c \uc2dc\uc791\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p>\uac01 \ucc38\uac00\uc790\ub294 \ud2b8\ub79c\uc7ad\uc158\uc744 \ucee4\ubc0b\ud560 \uc218 \uc788\ub294\uc9c0 \uc5ec\ubd80\uc5d0 \ub300\ud574 \ud22c\ud45c(\ub3d9\uc758 \ub610\ub294 \ubc18\ub300)\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p>\ucf54\ub514\ub124\uc774\ud130\ub294 \ubaa8\ub4e0 \ud22c\ud45c\ub97c \uc218\uc9d1\ud558\uace0 \ud2b8\ub79c\uc7ad\uc158\uc744 \ucee4\ubc0b\ud560\uc9c0 \uc911\ub2e8\ud560\uc9c0 \uacb0\uc815\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p>\ucee4\ubc0b \ub2e8\uacc4\uc5d0\uc11c \ucf54\ub514\ub124\uc774\ud130\ub294 \uc900\ube44 \ub2e8\uacc4\uc758 \uacb0\uacfc\uc5d0 \ub530\ub77c \ubaa8\ub4e0 \ucc38\uac00\uc790\uc5d0\uac8c \ucee4\ubc0b \ub610\ub294 \uc911\ub2e8 \uc694\uccad\uc744 \ubcf4\ub0c5\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p>\ucc38\uac00\uc790\ub294 \ubcc0\uacbd \uc0ac\ud56d\uc744 \uc601\uad6c\uc801\uc73c\ub85c \ucee4\ubc0b\ud558\uac70\ub098 \ud2b8\ub79c\uc7ad\uc158\uc744 \ub864\ubc31\ud558\ub294 \ub4f1 \ucd5c\uc885 \uacb0\uc815\uc744 \uc2e4\ud589\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<h2>2\ub2e8\uacc4 \ucee4\ubc0b\uc758 \uc8fc\uc694 \ud2b9\uc9d5 \ubd84\uc11d<\/h2>\n<p>2\ub2e8\uacc4 \ucee4\ubc0b\uc740 \ub2e4\uc74c\uacfc \uac19\uc740 \uba87 \uac00\uc9c0 \uc8fc\uc694 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/p>\n<ol>\n<li>\n<p><strong>\uc6d0\uc790\uc131<\/strong>: \ubaa8\ub4e0 \ub178\ub4dc\uac00 \ucee4\ubc0b\ub418\uac70\ub098 \uc5b4\ub290 \ub178\ub4dc\ub3c4 \ucee4\ubc0b\ub418\uc9c0 \uc54a\ub3c4\ub85d \ubcf4\uc7a5\ud558\uc5ec \ubd80\ubd84\uc801\uc774\uac70\ub098 \uc77c\uad00\ub418\uc9c0 \uc54a\uc740 \uc5c5\ub370\uc774\ud2b8\ub97c \ubc29\uc9c0\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\uc77c\uad00\uc131<\/strong>: \ud504\ub85c\ud1a0\ucf5c\uc740 \uc7a5\uc560\uac00 \ubc1c\uc0dd\ud558\ub354\ub77c\ub3c4 \uc2dc\uc2a4\ud15c\uc774 \uc77c\uad00\uc131\uc744 \uc720\uc9c0\ud558\ub3c4\ub85d \ubcf4\uc7a5\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\ub0b4\uad6c\uc131<\/strong>: \ud2b8\ub79c\uc7ad\uc158\uc774 \ucee4\ubc0b\ub418\uba74 \ubcc0\uacbd \uc0ac\ud56d\uc774 \uc601\uad6c\uc801\uc73c\ub85c \uc801\uc6a9\ub418\uc5b4 \uc2dc\uc2a4\ud15c \uc624\ub958\uac00 \ubc1c\uc0dd\ud574\ub3c4 \uc720\uc9c0\ub429\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\uc790\uc5f0\uc744 \ucc28\ub2e8\ud558\ub2e4<\/strong>: 2\ub2e8\uacc4 \ucee4\ubc0b\uc5d0\ub294 \ucc28\ub2e8 \ud2b9\uc131\uc774 \uc788\uc2b5\ub2c8\ub2e4. \uc989, \ucc38\uac00\uc790\uc758 \uc751\ub2f5\uc744 \ubb34\uae30\ud55c \uae30\ub2e4\ub9b4 \uc218 \uc788\uc5b4 \uc9c0\uc5f0\uc774 \ubc1c\uc0dd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<h2>2\ub2e8\uacc4 \ucee4\ubc0b \uc720\ud615<\/h2>\n<p>2\ub2e8\uacc4 \ucee4\ubc0b \ud504\ub85c\ud1a0\ucf5c\uc5d0\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \ubcc0\ud615\uc774 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<table>\n<thead>\n<tr>\n<th>\uc720\ud615<\/th>\n<th>\uc124\uba85<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\uae30\ubcf8 2\ub2e8\uacc4 \ucee4\ubc0b<\/td>\n<td>\uc55e\uc5d0\uc11c \uc124\uba85\ud55c \ud45c\uc900 \ubc84\uc804\uc785\ub2c8\ub2e4.<\/td>\n<\/tr>\n<tr>\n<td>3\ub2e8\uacc4 \ucee4\ubc0b<\/td>\n<td>\ucc28\ub2e8 \ubb38\uc81c\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud574 \ucd94\uac00 &quot;\uc0ac\uc804 \ucee4\ubc0b&quot; \ub2e8\uacc4\ub97c \ucd94\uac00\ud569\ub2c8\ub2e4.<\/td>\n<\/tr>\n<tr>\n<td>\ub099\uad00\uc801 \ucee4\ubc0b<\/td>\n<td>\ucc38\uac00\uc790\uac00 \ucf54\ub514\ub124\uc774\ud130\ub85c\ubd80\ud130 \uacb0\uc815\uc744 \ubc1b\uae30 \uc804\uc5d0 \uc0ac\uc804 \ucee4\ubc0b\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>2\ub2e8\uacc4 \ucee4\ubc0b \uc0ac\uc6a9 \ubc29\ubc95, \ubb38\uc81c \ubc0f \ud574\uacb0 \ubc29\ubc95<\/h2>\n<p>2\ub2e8\uacc4 \ucee4\ubc0b\uc740 \ub2e4\uc74c\uacfc \uac19\uc740 \ub2e4\uc591\ud55c \ubd84\uc57c\uc5d0\uc11c \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ucc3e\uc2b5\ub2c8\ub2e4.<\/p>\n<ol>\n<li>\n<p><strong>\ub370\uc774\ud130\ubca0\uc774\uc2a4 \uad00\ub9ac<\/strong>: \ubd84\uc0b0 \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc2dc\uc2a4\ud15c\uc758 \uc77c\uad00\uc131\uacfc \ubb34\uacb0\uc131\uc744 \ubcf4\uc7a5\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\uc804\uc790\uc0c1\uac70\ub798<\/strong>: \uc628\ub77c\uc778 \uad6c\ub9e4 \uc2dc \uc5ec\ub7ec \uc11c\ubc84\uc5d0 \uac78\uccd0 \uac70\ub798\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<p>\uadf8\ub7ec\ub098 \ud504\ub85c\ud1a0\ucf5c\uc5d0\ub294 \uba87 \uac00\uc9c0 \uc81c\ud55c \uc0ac\ud56d\uc774 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<ol>\n<li>\n<p><strong>\ube14\ub85c\ud0b9<\/strong>: 2PC\uc758 \ucc28\ub2e8 \ud2b9\uc131\uc73c\ub85c \uc778\ud574 \ud2b9\ud788 \ub300\uaddc\ubaa8 \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc131\ub2a5 \ubb38\uc81c\uac00 \ubc1c\uc0dd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\ub2e8\uc77c \uc2e4\ud328 \uc9c0\uc810<\/strong>: \ucf54\ub514\ub124\uc774\ud130\ub294 \ub2e8\uc77c \uc2e4\ud328 \uc9c0\uc810 \uc5ed\ud560\uc744 \ud569\ub2c8\ub2e4. \ucda9\ub3cc\uc774 \ubc1c\uc0dd\ud558\uba74 \uc804\uccb4 \uac70\ub798 \ud504\ub85c\uc138\uc2a4\uac00 \uc2e4\ud328\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<p>\uc774\ub7ec\ud55c \ubb38\uc81c\ub97c \uc644\ud654\ud558\uae30 \uc704\ud55c \uc77c\ubd80 \uc194\ub8e8\uc158\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<ol>\n<li>\n<p><strong>\ucd5c\uc801\ud654<\/strong>: \ucc28\ub2e8 \ubb38\uc81c\ub97c \uc904\uc774\uae30 \uc704\ud574 \uc989\uc2dc \ucee4\ubc0b \ub610\ub294 \ube44\ucc28\ub2e8 \ucee4\ubc0b \uc804\ub7b5\uacfc \uac19\uc740 \ucd5c\uc801\ud654 \uae30\uc220\uc744 \uad6c\ud604\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<li>\n<p><strong>\ucf54\ub514\ub124\uc774\ud130 \uc774\uc911\ud654<\/strong>: \ub0b4\uacb0\ud568\uc131\uc744 \ud5a5\uc0c1\uc2dc\ud0a4\uae30 \uc704\ud574 \uc7a5\uc560 \uc870\uce58 \uba54\ucee4\ub2c8\uc998\uc744 \uac16\ucd98 \ucf54\ub514\ub124\uc774\ud130 \uc911\ubcf5\uc131\uc744 \ub3c4\uc785\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<h2>\uc8fc\uc694 \ud2b9\uc9d5 \ubc0f \uae30\ud0c0 \uc720\uc0ac \uc6a9\uc5b4\uc640\uc758 \ube44\uad50<\/h2>\n<table>\n<thead>\n<tr>\n<th>\ud2b9\uc131<\/th>\n<th>2\ub2e8\uacc4 \ucee4\ubc0b\uacfc \ube44\uad50<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\uc77c\uad00\uc131<\/td>\n<td>\ubd84\uc0b0 \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc77c\uad00\uc131\uc744 \uc720\uc9c0\ud558\ub294 \ub370 \uc788\uc5b4 Three-phase commit \ubc0f Paxos\uc640 \uc720\uc0ac\ud569\ub2c8\ub2e4.<\/td>\n<\/tr>\n<tr>\n<td>\uc131\ub2a5<\/td>\n<td>Paxos \ubc0f Raft\uc5d0 \ube44\ud574 Two-phase \ucee4\ubc0b\uc740 \ucc28\ub2e8\uc73c\ub85c \uc778\ud574 \ub300\uae30 \uc2dc\uac04\uc774 \ub354 \uae38\uc5b4\uc9c8 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/td>\n<\/tr>\n<tr>\n<td>\uacb0\ud568 \ud5c8\uc6a9<\/td>\n<td>2\ub2e8\uacc4 \ucee4\ubc0b\uacfc Paxos\ub294 \ubaa8\ub450 \ub0b4\uacb0\ud568\uc131\uc744 \uc81c\uacf5\ud558\ub294 \ubc18\uba74 2\ub2e8\uacc4 \ucee4\ubc0b\uc740 \uad6c\ud604\uc774 \ub354 \uac04\ub2e8\ud569\ub2c8\ub2e4.<\/td>\n<\/tr>\n<tr>\n<td>\ud1b5\uc2e0 \uc624\ubc84\ud5e4\ub4dc<\/td>\n<td>Raft\ub294 Two-phase commit\ubcf4\ub2e4 \ud1b5\uc2e0 \uc624\ubc84\ud5e4\ub4dc\uac00 \uc801\uc73c\ubbc0\ub85c \ub300\uaddc\ubaa8 \uc2dc\uc2a4\ud15c\uc5d0 \ub354 \uc801\ud569\ud569\ub2c8\ub2e4.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>2\ub2e8\uacc4 \ucee4\ubc0b \uad00\ub828 \ubbf8\ub798 \uc804\ub9dd\uacfc \uae30\uc220<\/h2>\n<p>\ubd84\uc0b0 \uc2dc\uc2a4\ud15c\uc774 \uacc4\uc18d \ubc1c\uc804\ud568\uc5d0 \ub530\ub77c \ubcf4\ub2e4 \ud6a8\uc728\uc801\uc774\uace0 \ub0b4\uacb0\ud568\uc131\uc774 \uc788\ub294 \ud2b8\ub79c\uc7ad\uc158 \ud504\ub85c\ud1a0\ucf5c\uc774 \ub098\ud0c0\ub0a0 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc5f0\uad6c\uc6d0\ub4e4\uc740 \uc81c\ud55c \uc0ac\ud56d \ubc0f \ud655\uc7a5\uc131 \ubb38\uc81c\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud574 Raft, Paxos \ubc0f Two-phase \ucee4\ubc0b \ubcc0\ud615\uacfc \uac19\uc740 \ub300\uc548\uc744 \ubaa8\uc0c9\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. \ub610\ud55c \ud569\uc758 \uc54c\uace0\ub9ac\uc998\uacfc \uae30\uacc4 \ud559\uc2b5\uc758 \ubc1c\uc804\uc73c\ub85c \ubd84\uc0b0 \ud569\uc758\ub97c \ub2ec\uc131\ud558\ub294 \uc0c8\ub85c\uc6b4 \ubc29\ubc95\uc774 \ud0c4\uc0dd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>\ud504\ub85d\uc2dc \uc11c\ubc84\ub97c 2\ub2e8\uacc4 \ucee4\ubc0b\uacfc \uc0ac\uc6a9\ud558\uac70\ub098 \uc5f0\uacb0\ud558\ub294 \ubc29\ubc95<\/h2>\n<p>\ud504\ub85d\uc2dc \uc11c\ubc84\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 \uc11c\ubc84 \uc0ac\uc774\uc758 \uc911\uac1c\uc790 \uc5ed\ud560\uc744 \ud558\uba70 \ud074\ub77c\uc774\uc5b8\ud2b8\ub97c \ub300\uc2e0\ud558\uc5ec \uc694\uccad\uacfc \uc751\ub2f5\uc744 \ucc98\ub9ac\ud569\ub2c8\ub2e4. 2\ub2e8\uacc4 \ucee4\ubc0b\uacfc \uc9c1\uc811\uc801\uc73c\ub85c \uc5f0\uad00\ub418\uc9c0\ub294 \uc54a\uc9c0\ub9cc \ud504\ub85d\uc2dc \uc11c\ubc84\ub294 \uc5ec\ub7ec \ubc31\uc5d4\ub4dc \uc11c\ubc84\uc5d0 \ud2b8\ub79c\uc7ad\uc158\uc744 \ubd84\uc0b0\uc2dc\ud0a4\ub294 \ub370 \uc911\uc694\ud55c \uc5ed\ud560\uc744 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ud074\ub77c\uc774\uc5b8\ud2b8\uac00 \ud504\ub85d\uc2dc \uc11c\ubc84\ub97c \ud1b5\ud574 \ubd84\uc0b0 \ud2b8\ub79c\uc7ad\uc158\uc744 \uc2dc\uc791\ud558\uba74 \ud504\ub85d\uc2dc\ub294 2\ub2e8\uacc4 \ucee4\ubc0b \ud504\ub85c\ud1a0\ucf5c\uc5d0 \ucc38\uc5ec\ud558\uc5ec \uc694\uccad\uc744 \ub2e4\ub978 \ubc31\uc5d4\ub4dc \ub178\ub4dc\ub85c \uc9c0\ub2a5\uc801\uc73c\ub85c \ub77c\uc6b0\ud305\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \ubd84\uc0b0 \uc2dc\uc2a4\ud15c\uc5d0\uc11c \ub85c\ub4dc \ubc38\ub7f0\uc2f1\uacfc \ud5a5\uc0c1\ub41c \ub0b4\uacb0\ud568\uc131\uc774 \uac00\ub2a5\ud574\uc84c\uc2b5\ub2c8\ub2e4. \ub610\ud55c \ud504\ub85d\uc2dc \uc11c\ubc84\ub294 \uc751\ub2f5\uc744 \uce90\uc2dc\ud558\uc5ec \ubc31\uc5d4\ub4dc \ub178\ub4dc\uc758 \ub85c\ub4dc\ub97c \uc904\uc774\uace0 \uc804\ubc18\uc801\uc778 \uc2dc\uc2a4\ud15c \uc131\ub2a5\uc744 \ud5a5\uc0c1\uc2dc\ud0ac \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>\uad00\ub828\ub41c \ub9c1\ud06c\ub4e4<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.microsoft.com\/en-us\/research\/publication\/distributed-transactions-two-phase-commit-protocol\/\" target=\"_new\" rel=\"noopener nofollow\">\ubd84\uc0b0 \ud2b8\ub79c\uc7ad\uc158: 2\ub2e8\uacc4 \ucee4\ubc0b \ud504\ub85c\ud1a0\ucf5c<\/a><\/li>\n<li><a href=\"https:\/\/dzone.com\/articles\/a-guide-to-the-two-phase-commit-protocol\" target=\"_new\" rel=\"noopener nofollow\">2\ub2e8\uacc4 \ucee4\ubc0b \ud504\ub85c\ud1a0\ucf5c \uac00\uc774\ub4dc<\/a><\/li>\n<li><a href=\"https:\/\/www.infoq.com\/presentations\/paxos-distributed-consensus-protocols\/\" target=\"_new\" rel=\"noopener nofollow\">\ud569\uc758 \ud504\ub85c\ud1a0\ucf5c: 2\ub2e8\uacc4 \ucee4\ubc0b \ub300 Paxos<\/a><\/li>\n<li><a href=\"https:\/\/raft.github.io\/\" target=\"_new\" rel=\"noopener nofollow\">Raft \ud569\uc758 \uc54c\uace0\ub9ac\uc998 \uc774\ud574<\/a><\/li>\n<li><a href=\"https:\/\/lamport.azurewebsites.net\/pubs\/paxos-simple.pdf\" target=\"_new\" rel=\"noopener nofollow\">\uac04\ub2e8\ud574\uc9c4 Paxos<\/a><\/li>\n<\/ul>\n<p>\uacb0\ub860\uc801\uc73c\ub85c 2\ub2e8\uacc4 \ucee4\ubc0b\uc740 \uc5ec\ub7ec \ub178\ub4dc\uc5d0\uc11c \ud2b8\ub79c\uc7ad\uc158 \uc77c\uad00\uc131\uc744 \uc720\uc9c0\ud558\ub294 \ub370 \uc911\uc694\ud55c \ubd84\uc0b0 \uc54c\uace0\ub9ac\uc998\uc785\ub2c8\ub2e4. \ucc28\ub2e8 \ud2b9\uc131\uacfc \ucf54\ub514\ub124\uc774\ud130 \ucde8\uc57d\uc131\uc5d0\ub3c4 \ubd88\uad6c\ud558\uace0 \uc5ec\uc804\ud788 \ub2e4\uc591\ud55c \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \ub110\ub9ac \uc0ac\uc6a9\ub418\uace0 \uc788\uc2b5\ub2c8\ub2e4. \uae30\uc220\uc774 \ubc1c\uc804\ud568\uc5d0 \ub530\ub77c \uc5f0\uad6c\uc790\ub4e4\uc740 \uacc4\uc18d\ud574\uc11c \ub300\uc548\uacfc \ucd5c\uc801\ud654\ub97c \ubaa8\uc0c9\ud558\uace0 \uc788\uc73c\uba70 \ud504\ub85d\uc2dc \uc11c\ubc84\ub294 \ubd84\uc0b0 \uc2dc\uc2a4\ud15c\uc5d0\uc11c \ud6a8\uc728\uc131\uc744 \ud5a5\uc0c1\uc2dc\ud0ac \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uac15\ub825\ud558\uace0 \uc548\uc815\uc801\uc778 \ubd84\uc0b0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uad6c\ucd95\ud558\ub824\uba74 2\ub2e8\uacc4 \ucee4\ubc0b \ud504\ub85c\ud1a0\ucf5c\uc758 \ubbf8\ubb18\ud55c \ucc28\uc774\ub97c \uc774\ud574\ud558\ub294 \uac83\uc774 \ud544\uc218\uc801\uc785\ub2c8\ub2e4.<\/p>","protected":false},"featured_media":479421,"menu_order":0,"template":"","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"class_list":["post-479420","wiki","type-wiki","status-publish","has-post-thumbnail","hentry"],"acf":{"faq_title":"Frequently Asked Questions about <mark>Two-phase commit: A Comprehensive Overview<\/mark>","faq_items":[{"question":"What is Two-phase commit?","answer":"<p>Two-phase commit (2PC) is a distributed algorithm used in computer science to ensure the consistency of a transaction across multiple databases or resources. It guarantees that either all participating nodes commit to the transaction or none of them do, thereby maintaining data integrity and preventing inconsistencies in distributed systems.<\/p>"},{"question":"Who first introduced the concept of Two-phase commit?","answer":"<p>The concept of Two-phase commit was first introduced by E. W. Dijkstra in 1974 in his paper titled \"Solution of a Problem in Concurrent Programming Control.\" Later, in 1981, Jim Gray and Andreas Reuter formally described the Two-phase commit protocol in their paper \"Transaction Processing: Concepts and Techniques.\"<\/p>"},{"question":"How does Two-phase commit work?","answer":"<p>Two-phase commit operates in two phases: the preparation phase and the commit phase. In the preparation phase, the coordinator node sends a prepare request to all participating nodes, and each participant replies with an agreement (YES) or disagreement (NO). If any participant disagrees, the coordinator instructs all nodes to abort the transaction. In the commit phase, if all participants agreed during the preparation phase, the coordinator sends a commit request to all nodes. Each participant finalizes the transaction by making the necessary changes permanent. If any participant disagreed during the preparation phase, the coordinator sends an abort request to all nodes, and the transaction is rolled back.<\/p>"},{"question":"What are the key features of Two-phase commit?","answer":"<p>Two-phase commit offers several key features, including atomicity (ensuring all nodes commit or none do), consistency, durability, and a blocking nature (waiting for responses, potentially causing delays).<\/p>"},{"question":"Are there different types of Two-phase commit?","answer":"<p>Yes, variations of the Two-phase commit protocol exist. Some of them include:<\/p><ol><li>Basic Two-phase commit: The standard version described earlier.<\/li><li>Three-phase commit: Adds an extra \"pre-commit\" phase to address blocking issues.<\/li><li>Optimistic commit: Allows participants to pre-commit before receiving the decision from the coordinator.<\/li><\/ol>"},{"question":"In what applications is Two-phase commit used?","answer":"<p>Two-phase commit finds applications in various fields, including database management to ensure consistency and integrity in distributed databases, and e-commerce transactions for managing transactions across multiple servers during online purchases.<\/p>"},{"question":"What are the problems associated with Two-phase commit and their solutions?","answer":"<p>Two-phase commit has some limitations, such as its blocking nature and coordinator vulnerability. To mitigate these issues, optimization techniques like eager commit or non-blocking commit strategies can be employed. Additionally, introducing coordinator redundancy with a failover mechanism improves fault tolerance.<\/p>"},{"question":"How does Two-phase commit compare to other consensus protocols?","answer":"<p>Compared to other consensus protocols like Three-phase commit, Paxos, and Raft, Two-phase commit may exhibit higher latency due to blocking. While it provides fault tolerance and simplicity of implementation, alternatives like Raft and Paxos may offer lower communication overhead and better scalability.<\/p>"},{"question":"How does the future look for Two-phase commit?","answer":"<p>As distributed systems continue to evolve, researchers are exploring more efficient and fault-tolerant transaction protocols. Advancements in consensus algorithms and machine learning may lead to novel ways of achieving distributed agreement in the future.<\/p>"},{"question":"How are proxy servers associated with Two-phase commit?","answer":"<p>Proxy servers can play a significant role in distributing transactions across multiple backend servers. They can intelligently route requests to different backend nodes participating in the Two-phase commit protocol, ensuring load balancing and enhanced fault tolerance in distributed systems. Additionally, proxy servers can cache responses, reducing the load on backend nodes and improving overall system performance.<\/p>"}]},"_links":{"self":[{"href":"https:\/\/oneproxy.pro\/kr\/wp-json\/wp\/v2\/wiki\/479420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneproxy.pro\/kr\/wp-json\/wp\/v2\/wiki"}],"about":[{"href":"https:\/\/oneproxy.pro\/kr\/wp-json\/wp\/v2\/types\/wiki"}],"version-history":[{"count":0,"href":"https:\/\/oneproxy.pro\/kr\/wp-json\/wp\/v2\/wiki\/479420\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oneproxy.pro\/kr\/wp-json\/wp\/v2\/media\/479421"}],"wp:attachment":[{"href":"https:\/\/oneproxy.pro\/kr\/wp-json\/wp\/v2\/media?parent=479420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}