{"id":50588,"date":"2023-03-04T05:14:01","date_gmt":"2024-01-29T11:03:20","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/"},"modified":"2024-04-29T17:18:08","modified_gmt":"2024-04-29T09:18:08","slug":"%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/","title":{"rendered":"\u6211\u8bfb\u4e86\u300a\u6570\u636e\u9a71\u52a8\u5e94\u7528\u8bbe\u8ba1\u300b\u7b2c\u4e8c\u90e8\uff08\u5206\u5e03\u5f0f\u6570\u636e\uff09"},"content":{"rendered":"<p>\u56e0\u4e3a\u9605\u8bfb\u4e86\uff0c\u6240\u4ee5\u7559\u4e0b\u4e86\u4e2a\u4eba\u5907\u5fd8\u5f55\u3002<br \/>\n\u6b64\u5907\u5fd8\u5f55\u4e0d\u662f\u8be6\u5c3d\u65e0\u9057\u7684\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">1~4\u7ae0\u300c\u30c7\u30fc\u30bf\u6307\u5411\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30b6\u30a4\u30f3\u300d\u7b2c I \u90e8 (\u30c7\u30fc\u30bf\u30b7\u30b9\u30c6\u30e0\u306e\u57fa\u790e) \u3092\u8aad\u3093\u3060<\/ul>\n<\/li>\n<\/ul>\n<p>? 5~9\u7ae0\u300c\u30c7\u30fc\u30bf\u6307\u5411\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30b6\u30a4\u30f3\u300d\u7b2c II \u90e8 (\u5206\u6563\u30c7\u30fc\u30bf) \u3092\u8aad\u3093\u3060<\/p>\n<p>10~12\u7ae0\u300c\u30c7\u30fc\u30bf\u6307\u5411\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30b6\u30a4\u30f3\u300d\u7b2c III \u90e8 (\u5c0e\u51fa\u30c7\u30fc\u30bf) \u3092\u8aad\u3093\u3060<\/p>\n<p>\u56e0\u4e3a\u6211\u8bfb\u8fc7\u4e86\uff0c\u6240\u4ee5\u7559\u4e0b\u4e00\u4e9b\u4e2a\u4eba\u7684\u5907\u5fd8\u5f55\u3002<br \/>\n\u5e76\u4e0d\u662f\u8be6\u5c3d\u65e0\u9057\u7684\u5907\u5fd8\u5f55\u3002<\/p>\n<h1>\u7b2c\u4e94\u7ae0 \u590d\u5236<\/h1>\n<p>\u6570\u636e\u590d\u5236\u7684\u597d\u5904<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">(\u30c7\u30fc\u30bf\u3092\u30e6\u30fc\u30b6\u30fc\u306e\u8fd1\u304f\u306b\u4fdd\u6301\u3067\u304d)\u30ec\u30a4\u30c6\u30f3\u30b7\u30fc\u304c\u4e0b\u3052\u3089\u308c\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u53ef\u7528\u6027(= \u30ce\u30fc\u30c9\u969c\u5bb3\u3078\u306e\u8010\u6027)\u3092\u4e0a\u3052\u3089\u308c\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">(\u8aad\u307f\u53d6\u308a\u30af\u30a8\u30ea\u3092\u51e6\u7406\u3059\u308b\u30de\u30b7\u30f3\u3092\u30b9\u30b1\u30fc\u30eb\u30a2\u30a6\u30c8\u3055\u305b\u3089\u308c)\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u3092\u9ad8\u3081\u3089\u308c\u308b<\/ul>\n<p>\u51e0\u4e4e\u6240\u6709\u7684\u6570\u636e\u5e93\u90fd\u4f7f\u7528\u4ee5\u4e0b\u5176\u4e2d\u4e00\u79cd\u7b97\u6cd5\u6765\u5728\u8282\u70b9\u4e4b\u95f4\u590d\u5236\u53d8\u66f4\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b7\u30f3\u30b0\u30eb\u30ea\u30fc\u30c0\u30fc<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30de\u30eb\u30c1\u30ea\u30fc\u30c0\u30fc<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30ea\u30fc\u30c0\u30fc\u30ec\u30b9<\/ul>\n<h2>5.1 \u5355\u4e00\u9886\u5bfc\u8005(Note: This paraphrase assumes the phrase &#8220;\u30b7\u30f3\u30b0\u30eb\u30ea\u30fc\u30c0\u30fc&#8221; is referring to a single leader in a specific context, such as a team or organization.)<\/h2>\n<p>PostgreSQL\u3001MySQL\u3001MongoDB\u3001Kafka\u3001RabbitMQ\u7b49\u90fd\u662f\u5e38\u7528\u7684\u6570\u636e\u5e93\u53ca\u6d88\u606f\u961f\u5217\u5de5\u5177\u3002<\/p>\n<p>\u8fd9\u4e9b\u90fd\u662f\u590d\u5236\u54c1<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\uff11\u3064\u306fleader (= master = primary)<\/ul>\n<\/li>\n<\/ul>\n<p>write\u3092\u53d7\u3051\u4ed8\u3051\u308b\u3002\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u3092\u30ed\u30fc\u30ab\u30eb\u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u66f8\u3044\u305f\u3042\u3068\u3001\u30d5\u30a9\u30ed\u30ef\u30fc\u306b\u9001\u4fe1\u3059\u308b(=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3)<br \/>\nread\u3092\u53d7\u3051\u4ed8\u3051\u308b\u3002<\/p>\n<p>\u6b8b\u308a\u306ffollower (= read replica = slave = secondary = hot standby)<\/p>\n<p>read\u3092\u53d7\u3051\u4ed8\u3051\u308b\u3002<\/p>\n<p>\u5728\u4e2d\u6587\u4e2d\u7684\u8868\u8fbe\uff1a<\/p>\n<p>\u590d\u5236\u662f\u4e00\u4e2a\u8fc7\u7a0b\uff0c\u901a\u8fc7\u8be5\u8fc7\u7a0b\u53ef\u4ee5\u5236\u4f5c\u51fa\u4e0e\u539f\u7269\u76f8\u4f3c\u7684\u526f\u672c\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u540c\u671f\u7684<\/ul>\n<\/li>\n<\/ul>\n<p>\u30d5\u30a9\u30ed\u30ef\u30fc\u3067\u30c7\u30fc\u30bf\u66f4\u65b0\u304c\u30b3\u30df\u30c3\u30c8\u3055\u308c\u308b\u306e\u3092\u78ba\u8a8d\u3057\u3066\u304b\u3089\u30de\u30b9\u30bf\u30fc\u3067\u66f4\u65b0\u304c\u30b3\u30df\u30c3\u30c8\u3055\u308c\u308b\u3002<br \/>\n?\ufe0f(\u66f8\u304d\u8fbc\u307f\u3057\u305f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u898b\u3066\uff1f)\u30d5\u30a9\u30ed\u30ef\u30fc\u304c\u6301\u3063\u3066\u3044\u308b\u30c7\u30fc\u30bf\u306f\u5e38\u306b\u6700\u65b0\u3067\u3042\u308a\u30ea\u30fc\u30c0\u30fc\u3068\u306e\u4e00\u8cab\u6027\u304c\u4fdd\u969c\u3055\u308c\u308b<\/p>\n<p>\u975e\u540c\u671f\u7684<\/p>\n<p>?\ufe0f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u6210\u529f\u304c\u8fd4\u3055\u308c\u305f\u5834\u5408\u3067\u3082\u66f8\u304d\u8fbc\u307f\u306e\u6c38\u7d9a\u6027\u306f\u4fdd\u969c\u3055\u308c\u306a\u3044\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u66f8\u304d\u8fbc\u3093\u3060\u76f4\u5f8c\u306e\u30ea\u30fc\u30c0\u30fc\u306b\u969c\u5bb3\u304c\u767a\u751f\u3057\u3001\u305d\u306e\u66f4\u65b0\u304c\u53cd\u6620\u3055\u308c\u305f\u4ed6\u306e\u30ec\u30d7\u30ea\u30ab\u304cfail over\u306b\u3088\u3063\u3066\u30ea\u30fc\u30c0\u30fc\u306b\u306a\u3063\u305f\u5834\u5408\u3002<\/p>\n<p>\u30d5\u30a9\u30ed\u30ef\u30fc\u304c\u591a\u3044\u5834\u5408\u3084\u30d5\u30a9\u30ed\u30ef\u30fc\u304c\u5730\u7406\u7684\u306b\u5206\u6563\u3057\u3066\u3044\u308b\u5834\u5408\u306b\u5e83\u304f\u5229\u7528\u3055\u308c\u308b\u3002<\/p>\n<p>\u540c\u4e00\u7684\u6570\u636e\u5e93\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u8ffd\u968f\u8005\u7684\u9009\u62e9\u6765\u9009\u62e9\u540c\u6b65\u6216\u5f02\u6b65\u6a21\u5f0f\u3002<br \/>\n\u5e38\u89c1\u7684\u505a\u6cd5\u662f\u9488\u5bf9\u591a\u4e2a\u8ffd\u968f\u8005\u4e2d\u7684\u4e00\u4e2a\u8fdb\u884c\u540c\u6b65\u590d\u5236\uff0c\u5982\u679c\u901f\u5ea6\u4e0b\u964d\uff0c\u5c31\u5c06\u53e6\u4e00\u4e2a\u8ffd\u968f\u8005\u4e4b\u4e00\u5207\u6362\u4e3a\u540c\u6b65\u6a21\u5f0f\u3002<br \/>\n?\u53ef\u4ee5\u5728\u4e0d\u52a0\u9501\u7684\u60c5\u51b5\u4e0b\u5bf9\u6574\u4e2a\u6570\u636e\u5e93\u8fdb\u884c\u5feb\u7167\u3002\u5bf9\u4e8eMySQL\uff0c\u9700\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177innobackupex\u3002<br \/>\n?\u6570\u636e\u5e93\u7684\u72b6\u6001\u88ab\u5206\u914d\u4e86\u4e00\u4e2a\u7248\u672cID\u3002\u5bf9\u4e8ePostgreSQL\u6765\u8bf4\u662f\u65e5\u5fd7\u5e8f\u5217\u53f7\uff0c\u800c\u5bf9\u4e8eMySQL\u6765\u8bf4\u662fbinlog coordinate\u3002<\/p>\n<h3>\u5bf9\u8282\u70b9\u6545\u969c\u7684\u5e94\u5bf9\u63aa\u65bd<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30d5\u30a9\u30ed\u30ef\u30fc\u306e\u969c\u5bb3<\/ul>\n<\/li>\n<\/ul>\n<p>(\u969c\u5bb3 = \u30af\u30e9\u30c3\u30b7\u30e5\u3057\u3066\u518d\u8d77\u52d5\u3084\u3001\u30ea\u30fc\u30c0\u30fc\u3068\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304c\u4e00\u6642\u7684\u306b\u5207\u308c\u308b)<br \/>\n?\ufe0f \u30d5\u30a9\u30ed\u30ef\u30fc\u306f\u81ea\u529b\u3067\u30ad\u30e3\u30c3\u30c1\u30a2\u30c3\u30d7\u30ea\u30ab\u30d0\u30ea\u30fc\u306b\u3088\u3063\u3066\u5fa9\u6d3b\u3059\u308b\u3002(\u4fdd\u6301\u3057\u3066\u3044\u308b\u30c7\u30fc\u30bf\u5909\u66f4\u306e\u30ed\u30b0\u3092\u4f7f\u3046 + \u30ea\u30fc\u30c0\u30fc\u306b\u30ad\u30e3\u30c3\u30c1\u30a2\u30c3\u30d7)<\/p>\n<p>\u30ea\u30fc\u30c0\u30fc\u306e\u969c\u5bb3<\/p>\n<p>?\ufe0f\u30d5\u30a7\u30a4\u30eb\u30aa\u30fc\u30d0\u30fc\u3092\u884c\u3046\u3002<\/p>\n<p>(\u30ea\u30fc\u30c0\u30fc\u306f\u30ea\u30fc\u30c0\u30fc\u3068\u3057\u3066\u5fa9\u6d3b\u3059\u308b\u3053\u3068\u306f\u306a\u3044)<br \/>\n\u30d5\u30a9\u30ed\u30fc\u306e\u3044\u305a\u308c\u304b\u3092\u30ea\u30fc\u30c0\u30fc\u306b\u6607\u683c\u3055\u305b\u308b<br \/>\n\u30d5\u30a9\u30ed\u30ef\u30fc\u305f\u3061\u306f\u30c7\u30fc\u30bf\u5909\u66f4\u3092\u65b0\u3057\u3044\u30ea\u30fc\u30c0\u30fc\u304b\u3089\u53d7\u4fe1\u3057\u306f\u3058\u3081\u308b<\/p>\n<p>\u81ea\u52d5\u7684\u306a\u30d5\u30a7\u30a4\u30eb\u30aa\u30fc\u30d0\u30fc\u3068\u3001\u7ba1\u7406\u8005\u306b\u3088\u308b\u624b\u52d5\u306e\u30d5\u30a7\u30a4\u30eb\u30aa\u30fc\u30d0\u30fc\u304c\u3042\u308b\u3002<\/p>\n<p>\u81ea\u52d5\u3060\u3068\u30d5\u30a7\u30a4\u30eb\u30aa\u30fc\u30d0\u30fc\u306e\u691c\u77e5\u3067\u30d5\u30a9\u30fc\u30b9\u30dd\u30b8\u30c6\u30a3\u30d6\u304c\u767a\u751f\u3057\u3046\u308b\u3002(\u30b7\u30b9\u30c6\u30e0\u306e\u9ad8\u8ca0\u8377\u3084\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u554f\u984c\u3067\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306b\u3001\u3053\u308c\u304c\u30ea\u30fc\u30c0\u30fc\u30ec\u30d7\u30ea\u30ab\u306e\u969c\u5bb3\u3068\u898b\u306a\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b)<\/p>\n<h3>\u5173\u4e8e\u81ea\u52a8\u6545\u969c\u8f6c\u79fb<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30d7\u30ed\u30bb\u30b9<\/ul>\n<\/li>\n<\/ul>\n<p>\u30ea\u30fc\u30c0\u30fc\u306b\u969c\u5bb3\u304c\u8d77\u304d\u305f\u3053\u3068\u306e\u78ba\u8a8d\u3002\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3092\u5229\u7528\u3057\u3066\u691c\u77e5\u3059\u308b\u3053\u3068\u304c\u591a\u3044\u3002<br \/>\n\u65b0\u3057\u3044\u30ea\u30fc\u30c0\u30fc\u306e\u9078\u51fa\u3002<\/p>\n<p>\u6700\u3082\u3075\u3055\u308f\u3057\u3044\u5019\u88dc\u306f\u3001\u305d\u308c\u307e\u3067\u306e\u30ea\u30fc\u30c0\u30fc\u306e\u30c7\u30fc\u30bf\u5909\u66f4\u306b\u4e00\u756a\u6700\u8fd1\u307e\u3067\u5f93\u4e8b\u3057\u3066\u3044\u305f\u30ec\u30d7\u30ea\u30ab<br \/>\n\u9078\u51fa\u65b9\u6cd5\u306f<\/p>\n<p>\u6b8b\u3063\u3066\u3044\u30ec\u30d7\u30ea\u30ab\u306b\u3088\u308b\u9078\u51fa\u3067\u884c\u308f\u308c\u308b<br \/>\n\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30ce\u30fc\u30c9\u304c\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u3042\u308b\u3002<\/p>\n<p>\u30b7\u30b9\u30c6\u30e0\u306e\u518d\u8a2d\u5b9a<\/p>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u66f8\u304d\u8fbc\u307f\u3092\u65b0\u3057\u3044\u30ea\u30fc\u30c0\u30fc\u306b\u9001\u4fe1\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a<br \/>\n\u30d5\u30a9\u30ed\u30ef\u30fc\u306f\u65b0\u3057\u3044\u30ea\u30fc\u30c0\u30fc\u3092\u65b0\u3057\u3044\u30ea\u30fc\u30c0\u30fc\u304b\u3089\u53d7\u4fe1\u3059\u308b(\u3088\u3046\u306b\u8a2d\u5b9a\uff1f)<\/p>\n<p>\u5728\u6545\u969c\u8f6c\u79fb\u4e2d\u53ef\u80fd\u53d1\u751f\u7684\u95ee\u9898<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u975e\u540c\u671f\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u304a\u308a\u3001\u5143\u306e\u30ea\u30fc\u30c0\u30fc\u304c\u969c\u5bb3\u5f8c\u306b\u5fa9\u6d3b\u3057\u305f\u969b\u3001\u65b0\u3057\u3044\u30ea\u30fc\u30c0\u30fc\u3068\u306e\u9593\u3067\u30ec\u30fc\u30b9\u30b3\u30f3\u30c7\u30a3\u30b7\u30e7\u30f3\u304c\u767a\u751f\u3057\u3046\u308b\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30b9\u30d7\u30ea\u30c3\u30c8\u30d6\u30ec\u30a4\u30f3(\u8907\u6570\u306e\u30ec\u30d7\u30ea\u30ab\u304c\u81ea\u5206\u3092\u30ea\u30fc\u30c0\u30fc\u3068\u4fe1\u3058\u3066\u3044\u308b\u72b6\u614b)\u304c\u767a\u751f\u3057\u3046\u308b\u3002<\/ul>\n<h3>\u9886\u5bfc\u8005\u57fa\u4e8e\u7684\u590d\u5236\u65b9\u6cd5<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u30d9\u30fc\u30b9\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3<\/ul>\n<\/li>\n<\/ul>\n<p>\u30ea\u30fc\u30c0\u30fc\u306f\u66f8\u304d\u8fbc\u307f\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u30ed\u30b0\u306b\u8a18\u9332\u3057\u3001\u305d\u306e\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u30ed\u30b0\u3092\u30d5\u30a9\u30ed\u30ef\u30fc\u3078\u8ee2\u9001\u3059\u308b\u3002<br \/>\n?\ufe0f NOW() \u3084\u4e71\u6570\u306a\u3069\u306e\u975e\u6c7a\u5b9a\u7684\u306a\u95a2\u6570\u3092\u547c\u3076\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306f\u7834\u7dbb\u3092\u547c\u3076\u3002<br \/>\n?\ufe0f\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u3059\u308bid\u304c\u30c6\u30fc\u30d6\u30eb\u5185\u306b\u632f\u3089\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u5b9f\u884c\u9806\u5e8f\u304c\u5f71\u97ff\u3059\u308b\u3002\u2192 \u30ec\u30d7\u30ea\u30ab\u4e0a\u3067\u3082\u5b9f\u884c\u9806\u5e8f\u3092\u5408\u308f\u305b\u308b\u5fc5\u8981\u304c\u3042\u308b\u2192\u8907\u6570\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092serializable\u306b\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u751f\u3058\u308b<\/p>\n<p>write-ahead\u30ed\u30b0\u306e\u8ee2\u9001<\/p>\n<p>\u30ea\u30fc\u30c0\u30fc\u304c\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u66f8\u304d\u8fbc\u307f\u306e\u304b\u305f\u308f\u3089\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u305d\u308c\u3092\u30d5\u30a9\u30ed\u30ef\u30fc\u306b\u3082\u9001\u4fe1\u3059\u308b<br \/>\n?\ufe0f\u30ea\u30fc\u30c0\u30fc\u3068\u30d5\u30a9\u30ed\u30ef\u30fc\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u7d71\u4e00\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b \u2192 \u5834\u5408\u306b\u3088\u308a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u6642\u306b\u30c0\u30a6\u30f3\u30bf\u30a4\u30e0\u304c\u767a\u751f\u3059\u308b\u3002<\/p>\n<p>\u8ad6\u7406\u30ed\u30b0(row\u30d9\u30fc\u30b9)\u3092\u4f7f\u7528\u3057\u305f\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3<\/p>\n<p>\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u7528\u306e\u72ec\u7acb\u3057\u305f\u30ed\u30b0\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u30ed\u30b0(\u8ad6\u7406\u30ed\u30b0)\u3092\u4f7f\u7528\u3059\u308b<br \/>\n?\ufe0f\u8ad6\u7406\u30ed\u30b0\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306f\u5f8c\u65b9\u4e92\u63db\u6027\u3092\u4fdd\u3061\u3084\u3059\u3044<br \/>\n?\ufe0f\u8ad6\u7406\u30ed\u30b0\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306f\u5916\u90e8\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u30d1\u30fc\u30b9\u3057\u3084\u3059\u3044\u306e\u3067\u3001\u5916\u90e8\u306b\u9001\u4fe1\u3057\u3066\u305d\u3053\u3067\u4f7f\u7528(= \u5909\u66f4\u30c7\u30fc\u30bf\u306e\u30ad\u30e3\u30d7\u30c1\u30e3)\u3067\u304d\u308b<\/p>\n<p>\u30c8\u30ea\u30ac\u30fc\u30d9\u30fc\u30b9\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3<\/p>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5074\u306e\u30b3\u30fc\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3002<br \/>\n\u4f8b\u3048\u3070\u3001<\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30ed\u30b0\u3092\u8aad\u307f\u53d6\u308b\u30c4\u30fc\u30eb\u3092\u4f7f\u3046<br \/>\nRDB\u306estored procedure\u3092\u4f7f\u3044\u3001\u5225\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u30c7\u30fc\u30bf\u306e\u5909\u66f4\u3092\u66f8\u304d\u8fbc\u3080\u3002\u3053\u308c\u3092\u30d5\u30a9\u30ed\u30ef\u30fc\u304c\u8aad\u3080\u3002<\/p>\n<p>?\ufe0f\u67d4\u8edf\u6027\u304c\u9ad8\u3044\u3002<br \/>\n?\ufe0f\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u304c\u5927\u304d\u3044\u3002\u30d0\u30b0\u304c\u767a\u751f\u3057\u3084\u3059\u3044\u3002\u5236\u7d04\u304c\u751f\u3058\u3084\u3059\u3044\u3002<\/p>\n<h3>\u4e0e\u590d\u5236\u6ede\u540e\u76f8\u5173\u7684\u95ee\u9898<\/h3>\n<p>\u7531\u4e8e\u5206\u6563\u6027\uff0c\u4e0d\u53ef\u80fd\u5b8c\u5168\u540c\u65f6\u5bf9\u591a\u4e2a\u8282\u70b9\u8fdb\u884c\u66f4\u65b0\u3002\u7ed3\u679c\u5c31\u662f\u4f1a\u51fa\u73b0\u95ee\u9898\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u4e09\u4e2a\u7531\u4e8e\u5f02\u6b65\u590d\u5236\u7684\u590d\u5236\u6ede\u540e\u800c\u5f15\u8d77\u7684\u95ee\u9898\u3002\u5bf9\u4e8e\u6bcf\u4e2a\u95ee\u9898\uff0c\u4ecb\u7ecd\u4e86\u5728\u9886\u5bfc\u8005\u57fa\u7840\u4e0a\u91c7\u7528\u5f02\u6b65\u590d\u5236\u7684\u4fdd\u8bc1\u65b9\u6cd5\uff08\u8fd9\u4e9b\u7e41\u7410\u7684\u4fdd\u8bc1\u65b9\u6cd5\u662f\u4e8b\u52a1\u5b58\u5728\u7684\u610f\u4e49\uff0c\u53ef\u4ee5\u4f7f\u5e94\u7528\u7a0b\u5e8f\u6446\u8131\u8fd9\u4e9b\u9ebb\u70e6\u7684\u4fdd\u8bc1\u65b9\u6cd5\uff09\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u554f\u984c\u2460 \u3042\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304cwrite\u3057\u305f\u3042\u3068\u306bread\u3092\u3057\u305f\u969b\u3001\u81ea\u5206\u304cwrite\u3057\u305f\u306f\u305a\u306e\u30c7\u30fc\u30bf\u304c\u898b\u308c\u306a\u3044\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>\u539f\u56e0: read\u6642\u306b\u307e\u3060\u3001follower\u30ec\u30d7\u30ea\u30ab\u306b\u5909\u66f4\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u305f\u3044\u3002<br \/>\n\u4fdd\u969c:\u3053\u308c\u304c\u767a\u751f\u3057\u306a\u3044\u3088\u3046\u306b\u4fdd\u969c\u3055\u308c\u3066\u3044\u308b\u72b6\u614b\u3092\u300cread-after-write consistency\u304c\u4fdd\u305f\u308c\u308b\u300d\u3068\u547c\u3076\u3002\u30ea\u30fc\u30c0\u30fc\u30d9\u30fc\u30b9\u3067\u975e\u540c\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5834\u5408\u306e\u5b9f\u73fe\u65b9\u6cd5\u306f\u3001<\/p>\n<p>\u81ea\u5206\u304c\u66f4\u65b0\u3057\u305f\u30c7\u30fc\u30bf\u306eread\u306f leader\u30ec\u30d7\u30ea\u30ab\u304b\u3089\u8aad\u307f\u53d6\u308b<br \/>\n\u30c7\u30fc\u30bf\u306e\u66f4\u65b0\u6642\u523b\u3092\u8a18\u9332\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u3002\u6700\u5f8c\u306e\u66f4\u65b0\u6642\u523b\u304b\u3089\u4f8b\u3048\u3070\u4e00\u5206\u4ee5\u5185\u306b\u884c\u3046read\u306fleader\u30ec\u30d7\u30ea\u30ab\u304b\u3089\u884c\u3046<br \/>\nfollower\u30ec\u30d7\u30ea\u30ab\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30e9\u30b0\u3092\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3057\u3001\u4e00\u5206\u4ee5\u4e0aleader\u304b\u3089\u9045\u5ef6\u3057\u3066\u3044\u308b\u30ec\u30d7\u30ea\u30ab\u304b\u3089\u306fread\u3092\u884c\u308f\u306a\u3044\u3002<br \/>\nclient\u306f\u6700\u5f8c\u306e\u66f8\u304d\u8fbc\u307f\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u4fdd\u6301\u3059\u308b\u3002\u305d\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u307e\u3067\u306e\u66f4\u65b0\u304c\u53cd\u6620\u6e08\u307f\u306e\u30ec\u30d7\u30ea\u30ab\u304b\u3089\u3057\u304bread\u3092\u884c\u308f\u306a\u3044\u3002<\/p>\n<p>\u554f\u984c\u2461 \u3042\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u3088\u3063\u3066\u3042\u308b\u30ec\u30b3\u30fc\u30c9\u304cwrite\u3055\u308c\u305f\u3068\u3059\u308b\u3002\u3053\u306e\u6642\u3001\u4ed6\u306e\u3042\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u3068\u3063\u30661\u56de\u76ee\u306eread\u3067\u306fA\u304c\u898b\u3048\u308b\u304c\u30012\u56de\u76ee\u306eread\u3067\u306fA\u304c\u898b\u3048\u306a\u3044\u3002<\/p>\n<p>\u539f\u56e0: 1\u56de\u76ee\u30682\u56de\u76ee\u3067\u7570\u306a\u308bfollower\u30ec\u30d7\u30ea\u30ab\u3092\u898b\u3066\u304a\u308a\u3001\u524d\u8005\u306b\u306f\u5909\u66f4\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u304c\u5f8c\u8005\u306b\u306f\u5909\u66f4\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u306a\u3044\u3002<br \/>\n\u3053\u308c\u304c\u767a\u751f\u3057\u306a\u3044\u3088\u3046\u306b\u4fdd\u969c\u3055\u308c\u3066\u3044\u308b\u72b6\u614b\u3092\u300cmonotonic read\u304c\u4fdd\u969c\u3055\u308c\u308b\u300d\u3068\u547c\u3076\u3002\u30ea\u30fc\u30c0\u30fc\u30d9\u30fc\u30b9\u3067\u975e\u540c\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5834\u5408\u306e\u5b9f\u73fe\u65b9\u6cd5\u306f\u3001<\/p>\n<p>\u3042\u308b\u30e6\u30fc\u30b6\u30fc\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u3088\u308bread\u5148\u306e\u30ec\u30d7\u30ea\u30ab\u3092\u5e38\u306b\u540c\u3058\u3082\u306e\u306b\u3059\u308b\u3002\u4f8b\u3048\u3070\u3001user id \u306e\u30cf\u30c3\u30b7\u30e5\u5024\u306b\u3088\u3063\u3066\u6c7a\u3081\u308b\u3002<\/p>\n<p>\u554f\u984c\u2462 \u4ed6\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8(\u305f\u3061)\u306b\u3088\u3063\u3066A\u2192B\u306e\u9806\u306b\u30ec\u30b3\u30fc\u30c9\u304c\u66f8\u304b\u308c\u305f\u3068\u3059\u308b\u3002\u3042\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306eread\u6642\u306bA\u306f\u542b\u307e\u305aB\u3060\u3051\u304cread\u3067\u304d\u3066\u3057\u307e\u3046\u3002<\/p>\n<p>\u539f\u56e0: leader\u30ec\u30d7\u30ea\u30ab\u304c\u8907\u6570\u3042\u308b\u3001\u4f8b\u3048\u3070\u30b7\u30e3\u30fc\u30c7\u30a3\u30f3\u30b0\u3055\u308c\u305fDB\u3067\u554f\u984c\u306b\u306a\u308b\u3002\u6700\u521d\u306bread\u3057\u305ffollower\u30ec\u30d7\u30ea\u30ab\u306b\u306fA\u306e\u5909\u66f4\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u306a\u304b\u3063\u305f\u304c\u3001\u5f8c\u8005\u306b\u306fB\u306e\u5909\u66f4\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u305f\u3002<br \/>\n\u3053\u308c\u304c\u767a\u751f\u3057\u306a\u3044\u3088\u3046\u306b\u4fdd\u969c\u3055\u308c\u3066\u3044\u308b\u72b6\u614b\u3092\u300cconsistent prefix \u304c\u4fdd\u305f\u308c\u308b\u300d\u3068\u547c\u3076\u3002\u30ea\u30fc\u30c0\u30fc\u30d9\u30fc\u30b9\u3067\u975e\u540c\u671f\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5834\u5408\u306e\u5b9f\u73fe\u65b9\u6cd5\u306f\u3001<\/p>\n<p>\u56e0\u679c\u95a2\u4fc2\u306e\u3042\u308b\u66f8\u304d\u8fbc\u307f\u306f\u540c\u4e00\u306elead\u30ec\u30d7\u30ea\u30ab\u306b\u5bfe\u3057\u3066\u884c\u3046\u3002<\/p>\n<h2>5.3 \u591a\u4e3b\u590d\u5236<\/h2>\n<p>\u7531\u4e8e\u5728\u5355\u4e00\u6570\u636e\u4e2d\u5fc3\u5185\u7684\u5229\u76ca\u8f83\u5c11\uff0c\u56e0\u6b64\u5f88\u5c11\u88ab\u4f7f\u7528\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">leader\u30ec\u30d7\u30ea\u30ab\u306e\u5897\u52a0\u306b\u3088\u308a\u3001scalability\u306f\u6539\u5584<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">(\u8907\u6570\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u3088\u308b)latency\u306e\u6539\u5584\u306f\u306a\u3057<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">(\u8907\u6570\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u3088\u308b)availability\u306e\u6539\u5584\u306f\u306a\u3057<\/ul>\n<p>\u5373\u4f7f\u5728\u591a\u8bfb\u53d6\u5668\u590d\u5236\u4e2d\uff0c\u4f7f\u7528\u540c\u6b65\u590d\u5236\u5e76\u6ca1\u6709\u592a\u591a\u597d\u5904\u3002<\/p>\n<ul class=\"post-ul\">?\ufe0f \u540c\u671f\u7684\u306b\u885d\u7a81\u3092\u691c\u51fa\u3057\u305f\u3044\u306e\u304c\u76ee\u7684\u306a\u3089\u3001\u30b7\u30f3\u30b0\u30eb\u30ea\u30fc\u30c0\u30fc\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u3046\u3079\u3057\u3002<\/ul>\n<p>\u5728\u591a\u6570\u636e\u4e2d\u5fc3\u4e2d<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u5404\u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u5185\u3067\u3001leader\uff11\u3064\u3068follower\u8907\u6570<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u5404leader\u3078\u306ewrite\u306f\u4ee5\u4e0b\u3078\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3055\u308c\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>\u540c\u4e00\u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u5185\u306efollowers<br \/>\n\u4ed6\u306e\u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u306eleader (\u3053\u3053\u3067\u5225\u306e\u5909\u66f4\u304c\u884c\u308f\u308c\u3066\u3044\u305f\u5834\u5408\u3001\u66f8\u304d\u8fbc\u307f\u306e\u885d\u7a81\u2b50\u306e\u89e3\u6c7a\u304c\u5fc5\u8981)<\/p>\n<p>?\ufe0f \u4ee5\u4e0b\u3068\u5408\u308f\u305b\u3066\u554f\u984c\u306b\u306a\u308a\u3046\u308b\u3002\u3088\u3063\u3066\u53ef\u80fd\u3067\u3042\u308c\u3070\u907f\u3051\u308b\u3079\u304d\u3068\u898b\u3089\u308c\u308b\u3053\u3068\u3082\u3001<\/p>\n<p>\u81ea\u52d5\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u306e\u30ad\u30fc<br \/>\nDB\u306e\u30c8\u30ea\u30ac\u30fc<br \/>\nDB\u306econstraint<\/p>\n<p>\u4f7f\u7528\u4f8b\u3068\u3057\u3066\u3001\u30aa\u30d5\u30e9\u30a4\u30f3\u3067\u3082\u4f7f\u7528\u3067\u304d\u308b\u30ab\u30ec\u30f3\u30c0\u30fc\u30a2\u30d7\u30ea\u3002\u30c7\u30d0\u30a4\u30b9\u5185\u3001\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u30fc\u5185\u306e\u305d\u308c\u305e\u308c\u306b\u30ea\u30fc\u30c9\u30ec\u30d7\u30ea\u30ab\u3092\u6301\u3063\u3066\u3044\u308b\u3068\u89e3\u91c8\u3067\u304d\u308b\u3002<\/p>\n<p>\u6bcf\u4e2a\u9886\u5bfc\u8005\u526f\u672c\u90fd\u6709\u5173\u4e8e\u51b2\u7a81\u7684\u81ea\u5df1\u7684\u60f3\u6cd5\uff0c\u5e76\u5728\u66f4\u65b0\u5386\u53f2\u4e2d\u6301\u6709\u5176\u4ed6\u9886\u5bfc\u8005\u6536\u5230\u7684\u526f\u672c\u3002\u5f53\u6ee1\u8db3\u4ee5\u4e0b\u6240\u6709\u6761\u4ef6\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u8bf4\u53d1\u751f\u4e86\u51b2\u7a81\uff1f\uff08\u7248\u672c\u5411\u91cf\u53ef\u4ee5\u5b9e\u73b0\u8fd9\u4e00\u70b9\u5417\uff1f\uff09<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u81ea\u5206\u306e\u6301\u3063\u3066\u3044\u306a\u3044\u66f4\u65b0\u30b3\u30df\u30c3\u30c8\u3092\u542b\u3093\u3067\u3044\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u81ea\u5206\u306f\u53d7\u3051\u53d6\u3063\u305f\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u6301\u3063\u3066\u3044\u306a\u3044\u66f4\u65b0\u30b3\u30df\u30c3\u30c8\u304c\u8a70\u307e\u308c\u3066\u3044\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u305d\u308c\u3089\u306e\u30b3\u30df\u30c3\u30c8\u304c\u540c\u3058\u30ec\u30b3\u30fc\u30c9\u306b\u95a2\u3059\u308b\u3082\u306e\u3060\u3063\u305f\u308a\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30ed\u30b8\u30c3\u30af\u4e0a\u7247\u65b9\u3057\u304b\u8a31\u5bb9\u3067\u304d\u306a\u3044<\/ul>\n<p>\u6211\u89c9\u5f97\u4ec5\u4ec5\u7ed9\u66f4\u65b0\u6dfb\u52a0\u65f6\u95f4\u6233\u662f\u65e0\u6cd5\u68c0\u6d4b\u5230\u51b2\u7a81\u7684\u3002<\/p>\n<h2>5.4 \u65e0\u4e3b\u590d\u5236<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u4f7f\u7528\u4f8b<\/ul>\n<\/li>\n<\/ul>\n<p>dynamo db \u3092\u542b\u3080dynamo \u30b9\u30bf\u30a4\u30eb\u306eDB\u306f\u4f7f\u7528\u3057\u3066\u3044\u308b\u3002<br \/>\ncassandra (dynamo db\u306b\u5f71\u97ff\u3092\u53d7\u3051\u305f)<\/p>\n<p>\u9069\u3059\u308b\u72b6\u6cc1<\/p>\n<p>\u9ad8\u53ef\u7528\u6027\u3068\u4f4e\u30ec\u30a4\u30c6\u30f3\u30b7\u30fc\u304c\u6c42\u3081\u3089\u308c\u3001\u6642\u6298\u53e4\u3044\u30ec\u30b3\u30fc\u30c9\u304c\u8aad\u307e\u308c\u308b\u3053\u3068\u304c\u5f37\u8981\u3055\u308c\u308b\u5834\u5408\u3002<br \/>\n\u30de\u30eb\u30c1\u30ea\u30fc\u30c0\u30fc\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u540c\u69d8\u3001\u30de\u30eb\u30c1\u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u3067\u306e\u4f7f\u7528\u306b\u9069\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u5b9f\u88c5\u65b9\u5f0f\u306f\u8272\u3005<\/p>\n<p>?\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u66f8\u304d\u8fbc\u307f\u3092\u81ea\u5206\u3067\u8907\u6570\u306e\u30ec\u30d7\u30ea\u30ab\u306b\u9001\u4fe1\u3059\u308b<br \/>\ncoordinator node\u304c\u5404\u30ec\u30d7\u30ea\u30ab\u306b\u9001\u4fe1\u3059\u308b<\/p>\n<p>\u5728\u672c\u4e66\u4e2d\uff0c\u89e3\u91ca\u4e86\u4e00\u79cd\u540d\u4e3a\u201cQuorum\u5199\u5165\/\u8bfb\u53d6\u201d\u7684\u7eff\u8272\u65e0\u9886\u5bfc\u526f\u672c\u590d\u5236\u7b97\u6cd5\u3002\u5b83\u7684\u539f\u7406\u662f\uff0c\u5728\u5b58\u5728 N \u4e2a\u526f\u672c\u65f6\uff0c\u5c06 w \u548c r \u8bbe\u7f6e\u4e3a\u6ee1\u8db3 w + r &gt; N\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u66f8\u304d\u8fbc\u307f\u6642\u306b\u306f\u3001\u6700\u4f4ew\u500b\u306e\u30ec\u30d7\u30ea\u30ab\u3078\u306e\u66f4\u65b0\u304c\u53cd\u6620\u3055\u308c\u308b\u3053\u3068\u3092\u5fc5\u9808\u3068\u3059\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u8aad\u307f\u8fbc\u307f\u6642\u306b\u306f\u3001\u6700\u4f4er\u500b\u306e\u30ec\u30d7\u30ea\u30ab\u304b\u3089\u306e\u8aad\u307f\u53d6\u308a\u3092\u5fc5\u9808\u3068\u3059\u308b<\/ul>\n<p>\u984d\u5916\u8bf4\u660e\uff0c\u4ec5\u90e8\u5206\u590d\u5236\u54c1\u4e2d\u7684\u66f4\u65b0\u5c06\u6309\u7167\u4ee5\u4e0b\u65b9\u5f0f\u4f20\u9012\u81f3\u6240\u6709\u590d\u5236\u54c1\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u8aad\u307f\u53d6\u308a\u4fee\u5fa9<\/ul>\n<\/li>\n<\/ul>\n<p>= \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u8907\u6570\u306e\u30d7\u30ed\u30bb\u30b9\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u969b\u3001\u6700\u65b0\u306e\u66f8\u304d\u8fbc\u307f\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u306e\u5024\u3092\u305d\u3046\u3067\u306a\u3044\u30ec\u30b3\u30fc\u30c9\u306e\u5024\u306b\u4e0a\u66f8\u304d\u3059\u308b<\/p>\n<p>\u534a\u30a8\u30f3\u30c8\u30ed\u30d4\u30fc\u51e6\u7406<\/p>\n<p>= \u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306b\u3088\u308b\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3002<\/p>\n<p>\u5173\u4e8ew\u548cr\u7684\u8bbe\u7f6e\u3001<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u4f8b\u3048\u3070\u8aad\u307f\u8fbc\u307f\u30d8\u30d3\u30fc\u306a\u3089\u3001w=N, r=1\u306b\u3059\u308b\u3068\u826f\u3044\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">N &lt; w+r \u306e\u6642\u3001\u30ec\u30a4\u30c6\u30f3\u30b7\u30fc\u304c\u4f4e\u304f\u306a\u308b\u3002\u304b\u3064\u53ef\u7528\u6027\u304c\u9ad8\u307e\u308b\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">N &lt;&lt;&lt; w + r\u306e\u6642\u3001\u53e4\u3044\u5024\u3092\u8aad\u307f\u53d6\u3063\u3066\u3057\u307e\u3046\u53ef\u80fd\u6027\u304c\u9ad8\u307e\u308b\u3002-&gt; \u885d\u7a81\u306e\u89e3\u6c7a\u304c\u8907\u96d1\u306b\u306a\u308b\uff1f<\/ul>\n<p>\u6709\u5173\u5e76\u884c\u5199\u5165<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u5b9a\u7fa9 (\u26a0\ufe0f\u3053\u308c\u306f\u81ea\u5206\u3067\u8003\u3048\u305f)<\/ul>\n<\/li>\n<\/ul>\n<p>\u300c\u3042\u308b\u30ec\u30b3\u30fc\u30c9X\u306b\u5bfe\u3057\u3066\u4e8c\u3064\u306e\u66f8\u304d\u8fbc\u307f\u64cd\u4f5c\u304c\u3042\u308a\u3001X-&gt;A\u3068X-&gt;B \u3067\u3042\u308b\u6642\u3001(A\u306e\u30d2\u30b9\u30c8\u30ea\u30fc\u306bB\u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044) &amp;&amp; (B\u306e\u30d2\u30b9\u30c8\u30ea\u30fc\u306bA\u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044) \u306e\u6642\u306b\u3053\u308c\u3089\u306f\u4e26\u884c\u306a\u66f8\u304d\u8fbc\u307f\u3068\u8a00\u3048\u308b(?)<br \/>\n\u4e26\u884c\u306a\u66f8\u304d\u8fbc\u307f\u306e\u89e3\u6c7a\u65b9\u6cd5<br \/>\n\u30ec\u30d7\u30ea\u30ab\u304c\u4e00\u3064\u306e\u5834\u5408<\/p>\n<p>\u30b5\u30fc\u30d0\u30fc\u5074\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u305d\u308c\u305e\u308c\u3067\u3001\u300c\u3042\u308b\u30ec\u30b3\u30fc\u30c9\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30d2\u30b9\u30c8\u30ea\u30fc\u300d\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u3002\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u3067\u66f8\u304d\u8fbc\u307f\u6642\u306b\u306f\u307e\u305a\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30d2\u30b9\u30c8\u30ea\u30fc\u3092\u8aad\u307f\u51fa\u3059\u3002\u3082\u3057\u3082\u305d\u3053\u306b\u81ea\u5206\u306b\u306a\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u691c\u77e5\u3057\u305f\u3089\u3001\u6b21\u306e\u66f8\u304d\u8fbc\u307f\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u6240\u8b02\u30de\u30fc\u30b8\u30b3\u30df\u30c3\u30c8\u7684\u306a\u5909\u66f4\u306b\u306a\u308b\u3002<\/p>\n<p>\u30de\u30fc\u30b8\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306f\u3001\u8272\u3005\u3002\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64\u3067\u306e\u5b9f\u88c5\u4f8b\u3068\u3057\u3066\u306f\u3001<\/p>\n<p>\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u898b\u3066\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u63a1\u7528\u3002<br \/>\n\u5909\u66f4\u3092\u6bd4\u8f03\u3057\u3066\u548c\u96c6\u5408\u3092\u53d6\u308b\u3002(append\u306e\u5909\u66f4\u3057\u304b\u306a\u3044\u5834\u5408\u306b\u6709\u52b9)<\/p>\n<p>\u30ec\u30d7\u30ea\u30ab\u304c\u8907\u6570\u306e\u5834\u5408<\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u30d9\u30af\u30c8\u30eb\u3092\u4f7f\u7528\u3059\u308b\u306a\u3069\u3059\u308b\u3002<\/p>\n<p>?Cassandra\u662f\u53d7\u5230 Dynamo DB \u542f\u53d1\u7684\u65e0\u670d\u52a1\u6570\u636e\u5e93\u3002<\/p>\n<h1>\u7b2c\u516d\u7ae0 \u5212\u5206<\/h1>\n<p>\u5206\u5272\u7684\u76ee\u7684\u662f\u4e3a\u4e86\u53ef\u6269\u5c55\u6027\u3002\uff08\u6bcf\u4e2a\u8282\u70b9\u53ef\u4ee5\u72ec\u7acb\u5730\u67e5\u8be2\u5176\u62e5\u6709\u7684\u5206\u533a\uff09<\/p>\n<p>\u8fd9\u4e00\u7ae0\u4e2d\u5c06\u8981\u8bf4\u660e\u7684\u5185\u5bb9\u5982\u4e0b\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30c7\u30fc\u30bf\u306b\u5bfe\u3059\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4ed8\u3051<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30ce\u30fc\u30c9\u306e\u8ffd\u52a0\u3068\u305d\u306e\u969b\u306e\u30ea\u30d0\u30e9\u30f3\u30b7\u30f3\u30b0<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">DB\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9069\u5207\u306a\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/ul>\n<p>\u5728\u67d0\u4e9b\u5206\u533a\u4e2d\uff0c\u8bb0\u5f55\u7684\u5206\u5e03\u4e0d\u5e73\u8861\u88ab\u79f0\u4e3aSkew\uff0c\u800c\u5c06\u51fa\u73b0\u8fd9\u79cd\u60c5\u51b5\u7684\u5206\u533a\u79f0\u4e3ahot spot\u3002<\/p>\n<h2>\u7d22\u5f15\u7684\u65b9\u6cd5<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30ad\u30fc\u306e\u7bc4\u56f2\u306b\u57fa\u3065\u304f<\/ul>\n<\/li>\n<\/ul>\n<p>?\ufe0f \u305d\u306e\u30ad\u30fc\u306b\u3088\u308brange\u306b\u5bfe\u3059\u308b\u30b9\u30ad\u30e3\u30f3\u304c\u5bb9\u6613\u306b\u306a\u308b<br \/>\n?\ufe0f\u30a2\u30af\u30bb\u30b9\u30d1\u30bf\u30fc\u30f3\u306b\u3088\u3063\u3066\u306f\u30db\u30c3\u30c8\u30b9\u30dd\u30c3\u30c8\u304c\u767a\u751f\u3059\u308b<br \/>\n\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3092\u884c\u3046(\u274c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u6570\u56fa\u5b9a\u306f\u3060\u3081\u3002\u305d\u308c\u305e\u308c\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u7bc4\u56f2\u3092\u4e8b\u524d\u306b\u6c7a\u3081\u308b\u3068\u3001\u504f\u308a\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u304c\u3042\u308b)<\/p>\n<p>\u30ad\u30fc\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u306e\u7bc4\u56f2\u306b\u57fa\u3065\u304f<\/p>\n<p>\u26a0\ufe0f\u30cf\u30c3\u30b7\u30e5\u5024\u306emod\u3067\u5207\u308b\u306e\u306fNG (\u30ea\u30d0\u30e9\u30f3\u30b7\u30f3\u30b0\u306e\u8ca0\u62c5\u304c\u6975\u3081\u3066\u5927\u304d\u304f\u306a\u308b)<br \/>\n?\ufe0f\u30db\u30c3\u30c8\u30b9\u30dd\u30c3\u30c8\u3092\u907f\u3051\u308c\u308b<br \/>\n?\ufe0frange\u306b\u3088\u308bquery\u306f\u3059\u3079\u3066\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306b\u9001\u3089\u308c\u3001\u7d50\u679c\u3092\u30de\u30fc\u30b8\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b<\/p>\n<p>\u8907\u5408\u30ad\u30fc\u3092\u4f5c\u6210\u3059\u308b<\/p>\n<p>\u4ee5\u4e0b\u3002<\/p>\n<h2>\u5206\u533a\u548c\u6b21\u8981\u7d22\u5f15<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u8907\u5408\u30d7\u30e9\u30a4\u30de\u30ea\u30fc\u30ad\u30fc\u306f<\/ul>\n<\/li>\n<\/ul>\n<p>\u30d7\u30e9\u30a4\u30de\u30ea\u30fc\u30ad\u30fc\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u306b\u3088\u308a\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u6c7a\u5b9a\u3002<br \/>\n\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5185\u3067\u3001\u30bb\u30ab\u30f3\u30c0\u30ea\u30fc\u30ad\u30fc\u306b\u3088\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8cbc\u308b(\u30ed\u30fc\u30ab\u30eb\u30a4\u30f3\u30c7\u30c3\u30af\u30b9)<\/p>\n<p>\u901a\u5e38\u30bb\u30ab\u30f3\u30c0\u30ea\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u7279\u5b9a\u306e\u5024\u3092\u691c\u7d22\u3059\u308b\u65b9\u6cd5<\/p>\n<p>\u7531\u6b64\u4ea7\u751f\u7684\u7ed3\u679c<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u540c\u3058\u30d7\u30e9\u30a4\u30de\u30ea\u30ad\u30fc\u306e\u30ec\u30b3\u30fc\u30c9\u306f\u540c\u4e00\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5185\u306b\u3042\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5185\u3067\u30bb\u30ab\u30f3\u30c0\u30ea\u30fc\u30ad\u30fc\u306b\u3088\u308brange\u306equery\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u826f\u3044\u3002<\/ul>\n<p>\u7136\u800c\uff0c\u57fa\u4e8e\u4e8c\u7ea7\u7d22\u5f15\u7684\u641c\u7d22\u8bfb\u53d6\u5c06\u53d8\u6210\u5bf9\u6240\u6709\u5206\u533a\u8fdb\u884c\u6563\u5217\u4e0e\u5408\u5e76\u7684\u8fc7\u7a0b\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30bb\u30ab\u30f3\u30c0\u30ea\u30fc\u30ad\u30fc\u3067\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3055\u308c\u305f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4fdd\u6301\u3059\u308b\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>?\ufe0f \u30bb\u30ab\u30f3\u30c0\u30ea\u30fc\u30ad\u30fc\u306b\u3088\u308b\u691c\u7d22\u6642\u306b\u3001\u3069\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u898b\u306b\u884c\u304f\u5fc5\u8981\u304c\u3042\u308b\u304b\u5206\u304b\u308b\u3002<br \/>\n?\ufe0f \u66f8\u304d\u8fbc\u307f\u6642\u306b\u3053\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u66f4\u65b0\u3059\u308b\u305f\u3081\u306b\u4f4e\u901f\u3067\u8907\u96d1\u306b\u306a\u308b<\/p>\n<p>\u306a\u304a\u3001Dynamo DB\u3067\u306f\u3053\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u66f4\u65b0\u306f\u975e\u540c\u671f\u3067\u884c\u308f\u308c\u308b\u3002<\/p>\n<h2>\u91cd\u65b0\u5e73\u8861\u5206\u533a<\/h2>\n<p>\u89e3\u91cb\u5982\u4f55\u5f9e\u4e00\u500b\u96c6\u7fa4\u7bc0\u9ede\u5c07\u8ca0\u8f09\u8f49\u79fb\u5230\u53e6\u4e00\u500b\u7bc0\u9ede\u7684\u904e\u7a0b\u3002<\/p>\n<p>?\u518d\u5e73\u8861\u6218\u7565<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u6570\u3092\u56fa\u5b9a\u3059\u308b\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>\u30ce\u30fc\u30c9\u6570\u3088\u308a\u306f\u308b\u304b\u306b\u591a\u304f\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u3066\u304a\u304d\u3001\uff11\u3064\u306e\u30ce\u30fc\u30c9\u306b\u8907\u6570\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u5272\u308a\u5f53\u3066\u308b\u3002\u3042\u308b\u30ce\u30fc\u30c9\u306e\u8ca0\u62c5\u304c\u5927\u304d\u304f\u306a\u3063\u305f\u3089\u65b0\u305f\u306b\u30ce\u30fc\u30c9\u3092\u5897\u3084\u3057\u3001\u65e2\u5b58\u306e\u5168\u3066\u306e\u30ce\u30fc\u30c9\u304b\u3089\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u76d7\u3080\u3002<\/p>\n<p>\u30ea\u30d0\u30e9\u30f3\u30b7\u30f3\u30b0\u306e\u6700\u4e2d\u306f\u53e4\u3044\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306b\u5bfe\u3059\u308b\u8aad\u307f\u66f8\u304d\u304c\u884c\u308f\u308c\u308b<br \/>\n?\ufe0f \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u5897\u3084\u305b\u306a\u3044\u305f\u3081\u3001\u30c7\u30fc\u30bf\u91cf\u5897\u52a0\u306b\u3088\u308a\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u30b5\u30a4\u30ba\u304c\u5de8\u5927\u306b\u306a\u308a\u3046\u308b\u3002\u3059\u308b\u3068\u3001\u30ea\u30d0\u30e9\u30f3\u30b7\u30f3\u30b0\u3084\u30ce\u30fc\u30c9\u969c\u5bb3\u304b\u3089\u306e\u30ea\u30ab\u30d0\u30ea\u306e\u8ca0\u62c5\u304c\u5927\u304d\u304f\u306a\u308b\u3002<\/p>\n<p>dynamic partitioning<\/p>\n<p>\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u30b5\u30a4\u30ba\u304c\u95be\u5024\u3088\u308a\u5927\u304d\u304f\u306a\u308c\u3070\u5206\u5272\u3002\u5c0f\u3055\u304f\u306a\u308c\u3070\u4ed6\u3068\u30de\u30fc\u30b8\u3059\u308b\u3002<br \/>\n?\ufe0f \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5206\u5272\u3001\u30de\u30fc\u30b8\u3057\u305f\u3042\u3068\u3082\u3001\u30ad\u30fc\u306e\u7bc4\u56f2\u306f<\/p>\n<p>\u30ce\u30fc\u30c9\u6570\u306b\u6bd4\u4f8b\u3059\u308b\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0<\/p>\n<p>\u30ce\u30fc\u30c9\u3054\u3068\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u6570\u3092\u56fa\u5b9a\u3059\u308b\u3002\u30c7\u30fc\u30bf\u304c\u5897\u3048\u305f\u3089\u65b0\u3057\u3044\u30ce\u30fc\u30c9\u3092\u52a0\u3048\u3001\u65e2\u5b58\u306e\u5168\u3066\u306e\u30ce\u30fc\u30c9\u5185\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3(\u305d\u308c\u305e\u308c\uff11\u3064\uff1f)\u306e\u30ec\u30b3\u30fc\u30c9\u3092\u76d7\u3093\u3067\u304f\u308b\uff1f\uff1f\uff1f<\/p>\n<p>?\u8d44\u4ea7\u518d\u5e73\u8861\u64cd\u4f5c<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u81ea\u52d5\u306e\u30ea\u30d0\u30e9\u30f3\u30b7\u30f3\u30b0<\/ul>\n<\/li>\n<\/ul>\n<p>?\ufe0f \u4f8b\u3048\u3070\u3001\u3042\u308b\u30ce\u30fc\u30c9\u304c\u904e\u8ca0\u8377\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u51e6\u7406\u901f\u5ea6\u304c\u843d\u3061\u305f\u3068\u3059\u308b\u3002\u7d50\u679c\u3001\u4ed6\u306e\u30ce\u30fc\u30c9\u304c\u3053\u306e\u30ce\u30fc\u30c9\u304c\u843d\u3061\u305f\u3068\u898b\u306a\u3057\u3066\u30ea\u30d0\u30e9\u30f3\u30b7\u30f3\u30b0\u3092\u958b\u59cb\u3057\u305f\u5834\u5408\u3001\u3055\u3089\u306a\u308b\u8ca0\u8377\u304c\u304b\u304b\u308b\u3002<\/p>\n<p>\u624b\u52d5\u306e\u30ea\u30d0\u30e9\u30f3\u30b7\u30f3\u30b0<\/p>\n<p>(\u51e6\u7406\u306e\u3069\u3053\u304b\u306b\u4eba\u3092\u4ecb\u5728\u3055\u305b\u308b\u306e\u304c\u304a\u3059\u3059\u3081)<\/p>\n<p>\u7eff\u8272-\u8bf7\u6c42\u7684\u8def\u7531\u4f7f\u7528\u670d\u52a1\u53d1\u73b0\u3002\u7528\u4e8e\u89e3\u51b3\u5305\u542b\u7279\u5b9a\u952e\u8bb0\u5f55\u7684\u5206\u533a\u6240\u5728\u7684\u8282\u70b9\u3002\u6620\u5c04\u7684\u5b58\u50a8\u4f4d\u7f6e\u4e3a\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u5c64<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u5404\u30ce\u30fc\u30c9\u305d\u308c\u305e\u308c<\/ul>\n<p>\u65e0\u8bba\u5982\u4f55\uff0c\u8fd9\u4e9b\u90fd\u662f\u5f15\u7528\u8bf8\u5982Zookeeper\u7684\u96c6\u7fa4\u7ba1\u7406\u670d\u52a1\u6240\u6301\u6709\u7684\u6620\u5c04\u3002\u6bcf\u4e2a\u8282\u70b9\u5728\u8fdb\u884c\u91cd\u65b0\u5e73\u8861\u65f6\u4f1a\u5411\u5176\u53d1\u9001\u66f4\u65b0\u3002<\/p>\n<h1>\u7b2c\u4e03\u7ae0 \u4ea4\u6613<\/h1>\n<p>\u957f\u7bc7\u7d2f\u724d\u5730\u603b\u7ed3\u4e86\u4e00\u756a\uff0cP288\u7684\u603b\u7ed3\u975e\u5e38\u7cbe\u70bc\u3002<\/p>\n<p>\u4ea4\u6613\u6240\u63d0\u4f9b\u7684\u5b89\u5168\u4fdd\u969c<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Atomicity<\/ul>\n<\/li>\n<\/ul>\n<p>commit all .or. abort al<br \/>\nDB\u306e\u7279\u6027<\/p>\n<p>Consistency (\u4e00\u8cab\u6027)<\/p>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u6e80\u305f\u3055\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u4e0d\u5909\u6027\u3002<br \/>\n\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u3088\u3063\u3066\u7570\u306a\u308b\u3002\u4f8b\u3048\u3070\u4f1a\u8a08\u30b7\u30b9\u30c6\u30e0\u306e\u5834\u5408\u3001\u5168\u3066\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u307e\u3068\u3081\u308b\u3068\u5e38\u306b\u8cb8\u65b9\u3068\u501f\u65b9\u306f\u7b49\u3057\u3044\u3001\u306a\u3069\u3002<br \/>\nDB\u306e\u6027\u8cea\u3067\u306f\u306a\u304f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u7279\u6027<\/p>\n<p>Isolation<\/p>\n<p>\u4e26\u884c\u3057\u3066\u5b9f\u884c\u3055\u308c\u305f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u304a\u4e92\u3044\u304b\u3089\u5206\u96e2\u3055\u308c\u3066\u3044\u308b\u3053\u3068<br \/>\n\u8907\u6570\u306e\u30ec\u30d9\u30eb\u304c\u3042\u308b<\/p>\n<p>serializable level<br \/>\nsnapshot isolation level<br \/>\nread committed level<\/p>\n<p>DB\u306e\u7279\u6027<\/p>\n<p>Durability (\u6c38\u7d9a\u6027)<\/p>\n<p>\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u6210\u529f\u3057\u305f\u3089\u305d\u3053\u3067\u66f8\u304d\u8fbc\u307e\u308c\u305f\u5168\u3066\u306e\u30c7\u30fc\u30bf\u304c\u5931\u308f\u308c\u306a\u3044\u3053\u3068<br \/>\nDB\u306e\u7279\u6027<\/p>\n<p>\u987a\u4fbf\u63d0\u4e00\u4e0b\uff0c\u63a5\u4e0b\u6765\u51fa\u73b0\u7684\u540c\u4e00\u4e2a\u8bcd\u6c47\u88ab\u7528\u4e8e\u591a\u79cd\u542b\u4e49\u4e2d\uff0c\u5bfc\u81f4\u4e86\u56f0\u60d1\u3002<\/p>\n<hr \/>\n<p>\u6574\u7406&#8221;\u539f\u5b50\u6027&#8221;\u548c&#8221;\u4e00\u81f4\u6027&#8221;\u7684\u610f\u4e49<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Atomicity<\/ul>\n<\/li>\n<\/ul>\n<p>In ACID, commit all or abort all<br \/>\nIn multithreaded programming,\u3042\u308b\u51e6\u7406\u306e\u9014\u4e2d\u306b\u4ed6\u306e\u30b9\u30ec\u30c3\u30c9\u304b\u3089\u9014\u4e2d\u306e\u72b6\u614b\u304c\u898b\u3048\u306a\u3044\u3053\u3068 (ACID\u3067\u3053\u308c\u306fisolation)<\/p>\n<p>Consistency<\/p>\n<p>In asynchronous replication, \u7d50\u679c\u6574\u5408\u6027<br \/>\nIn CAP, \u7dda\u5f62\u5316\u53ef\u80fd\u6027 (9.2\u7ae0\u306b\u8a73\u3057\u3044)<br \/>\nIN ACID, \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u300c\u826f\u3044\u72b6\u614b\u300d\u306b\u3042\u308b\u3053\u3068\u3092\u8868\u3059\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u56fa\u6709\u306e\u6982\u5ff5<\/p>\n<p>\u5728\u5e94\u7528\u5c42\u4e2d\u91cd\u8bd5\u5931\u8d25\u7684\u4e8b\u52a1\uff0c\u800c\u4e0d\u662f\u5728\u6570\u636e\u5e93\u5185\u90e8\u91cd\u8bd5\u7684\u95ee\u9898\u70b9\u3002<\/p>\n<hr \/>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u6210\u529f\u3057\u305f\u304c\u30b3\u30df\u30c3\u30c8\u306e\u6210\u529f\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u9001\u4fe1\u4e2d\u306b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u969c\u5bb3\u304c\u8d77\u3053\u3063\u305f\u5834\u5408\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u305d\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u5931\u6557\u3057\u305f\u3068\u307f\u306a\u3059<\/ul>\n<\/li>\n<\/ul>\n<p>? \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30ec\u30d9\u30eb\u3067\u306e\u91cd\u8907\u6392\u9664\u4ed5\u7d44\u307f\u304c\u5fc5\u8981<\/p>\n<p>\u5931\u6557\u304cDB\u306e\u904e\u8ca0\u8377\u306b\u3088\u308b\u3082\u306e\u3060\u3063\u305f\u5834\u5408\u3001\u30ea\u30c8\u30e9\u30a4\u306f\u72b6\u6cc1\u3092\u60aa\u5316\u3055\u305b\u308b<\/p>\n<p>? \u30ea\u30c8\u30e9\u30a4\u306e\u56de\u6570\u3092\u5236\u9650\u3059\u308b\u3002exponential backoff \u3092\u884c\u3046\u3002\u904e\u8ca0\u8377\u306b\u95a2\u3059\u308b\u30a8\u30e9\u30fc\u306f\u4ed6\u306e\u30a8\u30e9\u30fc\u3068\u7570\u306a\u308b\u5bfe\u5fdc\u3092\u3059\u308b\u3002<\/p>\n<p>\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304cDB\u5916\u306b\u526f\u4f5c\u7528\u3092\u6301\u3064\u5834\u5408\u304c\u3042\u308b\u3002<\/p>\n<p>? \u8907\u6570\u306e\u30b7\u30b9\u30c6\u30e0\u3092\u307e\u3068\u3081\u3066\u30b3\u30df\u30c3\u30c8\u3059\u308b\u306b\u306ftwo phase commit\u304c\u4f7f\u3048\u308b\u304b\u3082<\/p>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u30ea\u30c8\u30e9\u30a4\u4e2d\u306b\u843d\u3061\u305f\u3089\u305d\u306e\u30d7\u30ed\u30bb\u30b9\u304cDB\u306b\u66f8\u3053\u3046\u3068\u3057\u305f\u30c7\u30fc\u30bf\u306f\u5931\u308f\u308c\u308b\u3002<\/p>\n<p>\u4ee5\u540e\u662f\u5173\u4e8e\u5b64\u7acb\u7684\u8bdd\u9898\u3002<\/p>\n<h2>\u8bfb\u53d6\u63d0\u4ea4\u7ea7\u522b<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u5b9a\u7fa9<\/ul>\n<\/li>\n<\/ul>\n<p>\u30c0\u30fc\u30c6\u30a3\u30fc\u30ea\u30fc\u30c9\u304c\u767a\u751f\u3057\u306a\u3044 = \u4ed6\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u672a\u30b3\u30df\u30c3\u30c8\u306e\u5909\u66f4\u306f\u898b\u3048\u306a\u3044<br \/>\n\u30c0\u30fc\u30c6\u30a3\u30fc\u30e9\u30a4\u30c8\u304c\u767a\u751f\u3057\u306a\u3044 = \u4ed6\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u672a\u30b3\u30df\u30c3\u30c8\u306e\u5909\u66f4\u3092\u542b\u3080\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u4e0a\u66f8\u304d\u304c\u3067\u304d\u306a\u3044<\/p>\n<p>\u5b9f\u88c5\u65b9\u6cd5<\/p>\n<p>\u30c0\u30fc\u30c6\u30a3\u30fc\u30ea\u30fc\u30c9\u304c\u767a\u751f\u3057\u306a\u3044<\/p>\n<p>? \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3054\u3068\u306b\u3001\u66f8\u304d\u8fbc\u307f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306b\u95a2\u3057\u3066\u3001\u30b3\u30df\u30c3\u30c8\u524d\u306e\u53e4\u3044\u5024\u3068\u3001\u30b3\u30df\u30c3\u30c8\u4e88\u5b9a\u306e\u65b0\u3057\u3044\u5024\u306e\u4e21\u65b9\u3092\u4fdd\u6301\u3059\u308b\u3002\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u9032\u884c\u4e2d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u8aad\u307f\u53d6\u308a\u6642\u306b\u306f\u3001\u53e4\u3044\u5024\u3092\u8fd4\u3059<br \/>\n\u274e \u8aad\u307f\u8fbc\u307f\u3092\u3059\u308b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306f\u305d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u884c\u30ed\u30c3\u30af\u26a0\ufe0f\u3092\u53d6\u5f97\u3059\u308b\u3001\u3060\u3068\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u60aa\u3044<\/p>\n<p>\u30c0\u30fc\u30c6\u30a3\u30fc\u30e9\u30a4\u30c8\u304c\u767a\u751f\u3057\u306a\u3044<\/p>\n<p>? \u66f8\u304d\u8fbc\u307f\u3092\u3059\u308b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306f\u305d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u884c\u30ed\u30c3\u30af\u3092\u53d6\u5f97\u3059\u308b\u3002<\/p>\n<p>\u53ef\u80fd\u53d1\u751f\u6b7b\u9501\u3002<\/p>\n<h2>\u5feb\u7167\u9694\u79bb\u7ea7\u522b<\/h2>\n<p>\u8fd9\u4e5f\u6ee1\u8db3\u4e86\u201c\u8bfb\u53d6\u63d0\u4ea4\u201d\u7684\u4fdd\u8bc1\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u5b9a\u7fa9<\/ul>\n<\/li>\n<\/ul>\n<p>non repeatable read \u304c\u767a\u751f\u3057\u306a\u3044 = \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u8aad\u307f\u53d6\u308b\u30c7\u30fc\u30bf\u306f\u3001\u5168\u3066\u305d\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u958b\u59cb\u6642\u306bDB\u306b\u30b3\u30df\u30c3\u30c8\u6e08\u307f\u306e\u3082\u306e\u306e\u307f\u3002<\/p>\n<p>\u26a0\ufe0f \u3053\u308c\u306f\u5404\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u306a\u304f\u3001\u8aad\u307f\u53d6\u308a\u6642\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3001\u3068\u6349\u3048\u308b\u3079\u304d\u3002 \u5225\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u8d70\u3063\u3066\u3044\u308b\u3068\u3057\u3066\u3001\u300c\u30ec\u30b3\u30fc\u30c9A\u306e\u8aad\u307f\u53d6\u308a\u5f8c\u306b\u305d\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u5b8c\u4e86\u3057\u3066\u3001\u6b21\u306eB\u306e\u8aad\u307f\u53d6\u308a\u6642\u306b\u305d\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u53cd\u6620\u5f8c\u306e\u65b0\u3057\u3044\u5024\u304c\u8fd4\u3055\u308c\u308b\u300d\u306e\u306f\u3001non repeatable read \u3067\u3042\u308b\u3002<br \/>\nnon repeatable read\u306f\u3001DB\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u6642\u3084\u3001\u5b9f\u884c\u6642\u9593\u306e\u9577\u3044\u5206\u6790\u30af\u30a8\u30ea\u6642\u306b\u554f\u984c\u306b\u306a\u308b<\/p>\n<p>\u305d\u308c\u305e\u308c\u306eDB\u306b\u304a\u3051\u308b\u547c\u3073\u540d<\/p>\n<p>Oracle\u3067\u306f\u3001Serializable level (\u304c\u3053\u308c\u3092\u6e80\u305f\u3059\u4e2d\u3067\u6700\u3082\u5236\u7d04\u304c\u5f31\u3044\u30ec\u30d9\u30eb)<br \/>\nPostgreSQL\u3067\u306f\u3001repeatable read<br \/>\nMySQL\u3067\u3082\u3001repeatable read<\/p>\n<p>\u5b9f\u88c5\u65b9\u6cd5<\/p>\n<p>\u66f8\u304d\u8fbc\u307f\u30ed\u30c3\u30af + MVCC(multi version concurrency control ?)\u3092\u7528\u3044\u308b\u3002<br \/>\n\u8aad\u307f\u8fbc\u307f\u6642\u306b\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u4e2d\u305a\u3063\u3068\u540c\u3058\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u304b\u3089\u8aad\u307f\u53d6\u308a\u3092\u884c\u3046\u3002<\/p>\n<p>?\u8aad\u307f\u53d6\u308a\u304c\u66f8\u304d\u8fbc\u307f\u3092\u30d6\u30ed\u30c3\u30af\u3059\u308b\u3053\u3068\u306f\u306a\u304f\u3001\u66f8\u304d\u8fbc\u307f\u304c\u8aad\u307f\u53d6\u308a\u3092\u30d6\u30ed\u30c3\u30af\u3059\u308b\u3053\u3068\u3082\u306a\u3044<\/p>\n<p>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u5358\u7d14\u306b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5168\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u3057\u3066\u304a\u304d\u3001\u898b\u3048\u306a\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u7121\u8996\u3059\u308b\u3002(\u5b9f\u969b\u306f\u8272\u3005 P.261)<\/p>\n<p>\u4ee5\u4e0b\u662f\u7528\u4e8e\u8bfb\u53d6\u4e00\u81f4\u7684\u5feb\u7167\u7684\u5b9e\u73b0\u65b9\u5f0f\u3002\uff08\u4fdd\u5b58\u6bcf\u4e2a\u5feb\u7167\u4f1a\u5bfc\u81f4\u6027\u80fd\u592a\u5dee\uff09<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u5b9f\u88c5\u4f8b<\/ul>\n<\/li>\n<\/ul>\n<p>\u305d\u308c\u305e\u308c\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u958b\u59cb\u6642\u70b9\u3067\u3001DB\u306f\u5b9f\u884c\u4e2d\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3002<br \/>\n\u65b0\u3057\u304f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u5185\u90e8\u7684\u306b\u4fdd\u6301\u3059\u308bcreated_by\u306b\u305d\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306eID\u304c\u4fdd\u6301\u3055\u308c\u308b\u3002<br \/>\n\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u66f4\u65b0\u6642\u306f\u3001\u65e2\u5b58\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u305d\u306e\u307e\u307e\u3067\u3001\u65b0\u3057\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u304c\u5185\u90e8\u7684\u306b\u4fdd\u6301\u3059\u308bcreated_by\u306b\u305d\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306eID\u304c\u4fdd\u6301\u3055\u308c\u308b\u3002<br \/>\n\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u524a\u9664\u6642\u306f\u3001\u8aad\u307f\u51fa\u3057\u305f\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306b\u542b\u307e\u308c\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8(\u5f8c\u8ff0)\u304c\u5185\u90e8\u7684\u306b\u4fdd\u6301\u3059\u308bdeleted_by\u306b\u305d\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306eID\u304c\u4fdd\u6301\u3055\u308c\u308b<br \/>\n\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u4e2d\u306b\u8aad\u307f\u8fbc\u307f\u6642\u306b\u3001\u305d\u308c\u307e\u3067\u306b\u30b3\u30df\u30c3\u30c8\u6e08\u307f\u306etransaction_id\u306e\u96c6\u5408\u3092ids\u3068\u3059\u308b\u3068\u3001(created_by in ids &amp;&amp; created_by) &amp;&amp; (deleted_by == null || deleted_by not in ids) \u306e\u4e2d\u3067created_by\u304c\u6700\u5927\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8aad\u307f\u53d6\u308b<\/p>\n<h2>\u5199\u5165\u6392\u961f\u95ee\u9898<\/h2>\n<p>\u4f5c\u4e3a\u524d\u4e00\u7ae0\u6ca1\u6709\u63d0\u53ca\u7684\u8d5b\u8f66\u6761\u4ef6\u4e4b\u4e00\uff0c\u5199\u5165\u504f\u659c\u88ab\u63d0\u51fa\u3002\u5199\u5165\u961f\u5217\u662f\u6307\u5f53\u4e24\u4e2a\u4e8b\u52a1\u6839\u636e\u6765\u81ea\u76f8\u540c\u5bf9\u8c61\uff08\u7ec4\uff09\u7684\u8bfb\u53d6\u7ed3\u679c\u8fdb\u884c\u5199\u5165\u65f6\u4f1a\u53d1\u751f\u7684\u8d5b\u8f66\u6761\u4ef6\u3002<\/p>\n<p>\u5728\u8fd9\u4e9b\u4e2d\uff0c\u6211\u4eec\u63d0\u5230\u4e86\u201c\u66f4\u65b0\u4e22\u5931\u201d\u548c\u201c\u5e7b\u5f71\u201d\uff08\u5728\u67d0\u4e9b\u6570\u636e\u5e93\u4e2d\uff0c\u4f7f\u7528\u4e0a\u8ff0\u7248\u672c\u53ef\u80fd\u4e0d\u4f1a\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\uff09\u3002<\/p>\n<h3>\u66f4\u65b0\u7684\u4e22\u5931\u95ee\u9898 de<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u5b9a\u7fa9<\/ul>\n<\/li>\n<\/ul>\n<p>\u300c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304cDB\u304b\u3089\u306a\u3093\u3089\u304b\u306e\u5024\u3092\u8aad\u307f\u53d6\u308a\u3001\u305d\u306e\u5024\u3092\u5143\u306b\u65b0\u305f\u306a\u5024\u3092DB\u306b\u66f8\u304d\u8fbc\u3080\u300dread-modify-write \u64cd\u4f5c\u3092\u4e8c\u3064\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3067\u540c\u6642\u306b\u884c\u3063\u305f\u6642\u306b\u767a\u751f\u3057\u3046\u308b\u3002<br \/>\n(1\u3064\u76ee\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u8aad\u307f\u53d6\u308a) -&gt; (2\u3064\u76ee\u306e\u8aad\u307f\u53d6\u308a) -&gt; (1\u3064\u76ee\u306e\u66f8\u304d\u8fbc\u307f?) -&gt; (2\u3064\u76ee\u306e\u66f8\u304d\u8fbc\u307f?) \u306e\u9806\u306b\u884c\u308f\u308c\u305f\u5834\u5408\u3001?\u304c?\u3092\u4e0a\u66f8\u304d\u3057\u3001?\u306e\u66f4\u65b0\u304c\u5931\u308f\u308c\u308b\u3002<\/p>\n<p>\u4f8b<\/p>\n<p>\u4e8c\u4eba\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u66f4\u65b0\u3059\u308b\u5834\u5408\u306b\u3001\u7247\u65b9\u306e\u66f4\u65b0\u304c\u5931\u308f\u308c\u308b\u3002<\/p>\n<p>\u89e3\u6c7a\u65b9\u6cd5<\/p>\n<p>\u2460 DB\u306e\u63d0\u4f9b\u3059\u308b\u30a2\u30c8\u30df\u30c3\u30af\u306a\u66f4\u65b0\u51e6\u7406\u3092\u5229\u7528\u3059\u308b\u3002\u591a\u304f\u306eRDB\u3067\u306f<\/p>\n<p>SELECT users SET col = col + 1 WHERE key = &#8216;foo&#8217; \u3067\u3001read-modify-write \u64cd\u4f5c\u3092\u30a2\u30c8\u30df\u30c3\u30af(transaction\u3088\u308a\u7c92\u5ea6\u306f\u5c0f\u3055\u3044\u306f\u305a)\u306b\u5b9f\u884c\u3057\u3066\u304f\u308c\u308b\u3002<br \/>\n\u53ef\u80fd\u306a\u5185\u90e8\u5b9f\u88c5\u306f\u3001<\/p>\n<p>\u2460\u30ab\u30fc\u30bd\u30eb\u56fa\u5b9a = \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306f\u8aad\u307f\u53d6\u308a\u301c\u66f8\u304d\u8fbc\u307f\u5b8c\u4e86\u307e\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30ed\u30c3\u30af\u3092\u53d6\u5f97\u3059\u308b\u3002<br \/>\n\u2461\u5168\u3066\u306e\u64cd\u4f5c\u3092\u5358\u4e00\u30b9\u30ec\u30c3\u30c9\u4e0a\u3067\u5b9f\u884c\u3059\u308b<\/p>\n<p>ORmapper\u3092\u4f7f\u3046\u3068\u3053\u308c\u3092\u4f7f\u308f\u305a\u3001\u610f\u56f3\u305b\u305a\u5b89\u5168\u306aread-modify-write\u30b5\u30a4\u30af\u30eb\u3092\u5b9f\u884c\u3059\u308b\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u304c\u3061\u3002<\/p>\n<p>\u2461 DB\u306e\u63d0\u4f9b\u3059\u308b\u66f4\u65b0\u306e\u30ed\u30b9\u30c8\u306e\u81ea\u52d5\u691c\u51fa\u3092\u5229\u7528\u3059\u308b<\/p>\n<p>read-modify-write\u30b5\u30a4\u30af\u30eb\u306e\u4e26\u5217\u5b9f\u884c\u3092\u8a31\u53ef\u3057\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u304c\u66f4\u65b0\u306e\u30ed\u30b9\u30c8\u3092\u691c\u51fa\u3057\u305f\u3089\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u4e2d\u65ad\u304b\u3064\u30ea\u30c8\u30e9\u30a4\u3059\u308b\u3002<\/p>\n<p>?\u5bfe\u5fdc\u3057\u3066\u3044\u308bDB\/\u5206\u96e2\u30ec\u30d9\u30eb\u306f\u3001PostgreSQL\u306erepeatable read\u3001 Oracle\u306eserializable\u3001 SQL server\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u5206\u96e2\u30ec\u30d9\u30eb\u3002<br \/>\nMySQL\/InnoDB\u306erepeatable read\u3067\u306f\u3053\u308c\u3092\u63d0\u4f9b\u3057\u3066\u3044\u306a\u3044\u3002<\/p>\n<p>\u2462 \u66f8\u304d\u8fbc\u307f\u6642\u306b\u660e\u793a\u7684\u306b\u884c\u30ed\u30c3\u30af\u3092\u53d6\u5f97\u3059\u308b\u3002<\/p>\n<p>SELECT * FROM users WHERE id=5 **FOR UPDATE **<br \/>\n? \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9\u306e\u3069\u3053\u304b\u3067\u5fc5\u8981\u306a\u30ed\u30c3\u30af\u3092\u8ffd\u52a0\u3057\u5fd8\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b<\/p>\n<p>\u2463 \u5206\u96e2\u30ec\u30d9\u30eb\u3068\u3057\u3066Serializable level\u3092\u63a1\u7528\u3059\u308b\u3002<\/p>\n<p>\u5728\u5177\u6709\u591a\u4e2a\u9886\u5bfc\u8005\u548c\u65e0\u9886\u5bfc\u8005\u590d\u5236\u7684\u6570\u636e\u5e93\u4e2d\uff0c\u65e0\u6cd5\u4f7f\u7528 \u2460\u2461\u2462\u3002<\/p>\n<h3>\u5e7d\u7075\u5f15\u5bfc\u5bfc\u81f4\u7684\u5199\u5165\u504f\u5dee<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u5b9a\u7fa9<\/ul>\n<\/li>\n<\/ul>\n<p>\u5947\u8972\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u306f\u3001\u300c\u2460SELECT\u6587?\u3067\u3042\u308b\u6761\u4ef6\u3092\u6e80\u305f\u3059\u304b\u78ba\u8a8d -&gt; \u2461\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u51e6\u7406\u3092\u7d9a\u884c\u3059\u308b\u304b\u5224\u65ad -&gt; \u2462DB\u3078\u66f8\u304d\u8fbc\u307f\u300d\u3067\u3001\u6700\u5f8c\u306e\u66f8\u304d\u8fbc\u307f\u3088\u308a\u524d\u306b?\u306e\u6761\u4ef6\u304c\u6e80\u305f\u3055\u308c\u306a\u304f\u306a\u3063\u3066\u3044\u308b\u3002<br \/>\n\u4f8b<\/p>\n<p>\u2776 \u75c5\u9662\u306e\u5f53\u76f4\u30b7\u30b9\u30c6\u30e0\u306b\u304a\u3044\u3066\u3001\u3042\u308b\u6642\u9593\u5e2f\u306b\u4ed6\u306e\u533b\u8005\u306e\u5f53\u76f4\u5f53\u756a\u304c\u5165\u3063\u3066\u3044\u305f\u3089\u30ad\u30e3\u30f3\u30bb\u30eb\u304c\u3067\u304d\u308b\u3002<br \/>\n\u2777 \u30e6\u30fc\u30b6\u30fc\u304c\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u767b\u9332\u3059\u308b\u969b\u306b\u3001\u3082\u3057\u305d\u308c\u304c\u30e6\u30cb\u30fc\u30af\u306a\u540d\u524d\u3067\u306a\u3051\u308c\u3070\u4f5c\u6210\u5931\u6557\u306b\u3059\u308b<\/p>\n<p>\u89e3\u6c7a\u65b9\u6cd5<\/p>\n<p>\u2460\u306e\u30ed\u30c3\u30af\u53d6\u5f97\u30af\u30a8\u30ea\u3067\u30ed\u30c3\u30af\u53d6\u5f97\u3002\u3064\u307e\u308a\u3001SELECT ~ FOR UPDATE \u306b\u3088\u308a\u95a2\u9023\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5168\u3066\u306e\u30ed\u30c3\u30af\u3092\u53d6\u308b<\/p>\n<p>? \u2777\u306e\u30e6\u30cb\u30fc\u30af\u306avalidation\u3067\u306f\u4f7f\u7528\u3067\u304d\u306a\u3044\u3002\u306a\u305c\u306a\u3089\u3001\u6761\u4ef6\u3092\u6e80\u305f\u3059\u884c\u304c\u5b58\u5728\u3057\u306a\u3044\u3053\u3068\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3044\u308b\u304b\u3089\u3002<\/p>\n<p>\u2461\u885d\u7a81\u306e\u5b9f\u4f53\u5316 = \u6761\u4ef6\u3092\u6e80\u305f\u3059\u884c\u304c\u5b58\u5728\u3057\u306a\u3044\u3053\u3068\u3092\u30c1\u30a7\u30c3\u30af\u306e\u305f\u3081\u306b\u3001\u5b58\u5728\u3059\u308b\u5168\u3066\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u542b\u3080\u30c6\u30fc\u30d6\u30eb\u3092\u7528\u610f\u3059\u308b\u3002<\/p>\n<p>= \u30d5\u30a1\u30f3\u30c8\u30e0\u3092DB\u4e2d\u306e\u884c\u306e\u96c6\u5408\u306b\u304a\u3051\u308b\u30ed\u30c3\u30af\u306e\u885d\u7a81\u306b\u7f6e\u304d\u63db\u3048\u308b<br \/>\n? \u4e26\u884c\u6027\u306e\u5236\u5fa1\u306e\u4ed5\u7d44\u307f\u3092\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c7\u30fc\u30bf\u30e2\u30c7\u30eb\u306b\u6f0f\u308c\u51fa\u3057\u3066\u3057\u307e\u3046\u306e\u306f\u671b\u307e\u3057\u304f\u306a\u3044<\/p>\n<p>\u2462\u6761\u4ef6\u3092\u6e80\u305f\u3059\u884c\u304c\u5b58\u5728\u3057\u306a\u3044\u3053\u3068\u3092\u30c1\u30a7\u30c3\u30af<br \/>\n? PostgreSQL\u306erepeatable read\u3001 Oracle\u306eserializable\u3001 SQL server\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u5206\u96e2\u30ec\u30d9\u30eb\u3067\u306f\u81ea\u52d5\u691c\u77e5\u3067\u304d\u306a\u3044\u3002<\/p>\n<h2>\u53ef\u5e8f\u5217\u5316\u7b49\u7ea7<\/h2>\n<p>\u5177\u5907\u6700\u5f3a\u5206\u79bb\u6027\u80fd\uff0c\u53ef\u907f\u514d\u6240\u6709\u53ef\u80fd\u7684\u6570\u636e\u5e93\u7ade\u4e89\u6761\u4ef6\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u5b9a\u7fa9<\/ul>\n<\/li>\n<\/ul>\n<p>\u8907\u6570\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u305d\u308c\u305e\u308c\uff11\u3064\u305a\u3064\u9806\u756a\u306b\u3001\u4e26\u884c\u3067\u306a\u304f\u5b9f\u884c\u3067\u3055\u308c\u305f\u5834\u5408\u3068\u540c\u3058\u306b\u306a\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3059\u308b\u3002<\/p>\n<p>\u5b9f\u88c5\u65b9\u6cd5<\/p>\n<p>\u2460\u5b8c\u5168\u306a\u9010\u6b21\u5b9f\u884c = \u5358\u4e00\u30b9\u30ec\u30c3\u30c9\u3067\u9806\u6b21\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b<\/p>\n<p>\u305f\u3060\u3057\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u554f\u984c\u306b\u306a\u308b\u306e\u3067\u3001<\/p>\n<p>OLTP\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u3088\u3046\u306b\u3001\u5c0f\u3055\u304f\u3066\u9ad8\u901f(\u77ed\u304f\u5c11\u6570\u306e\u8aad\u307f\u66f8\u304d\u3057\u304b\u3057\u306a\u3044)\u5834\u5408\u306e\u307f\u4f7f\u7528\u3059\u308b\u3002<br \/>\n\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u30b3\u30fc\u30c9\u5168\u4f53\u3092\u30b9\u30c8\u30a2\u30c9\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3068\u3057\u3066DB\u306b\u767b\u9332\u3057\u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u3002\u3053\u308c\u306b\u3088\u3063\u3066\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30af\u30a8\u30ea\u767a\u884c\u306e\u5f85\u3061\u6642\u9593\u3084\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u901a\u4fe1\u306e\u5f85\u3061\u6642\u9593\u304c\u4e0d\u8981\u306b\u306a\u308b\u3002(\u30b9\u30c8\u30a2\u30c9\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306e\u8a00\u8a9e\u306f\u3001VoltDb\u306fJava\u3001Redis\u306fLua)<br \/>\nDB\u3092\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3059\u308b\u3002\u305f\u3060\u3057\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u4f7f\u7528\u3059\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u7684\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u5358\u4e00\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3067\u5b9f\u884c\u3067\u304d\u308b\u5834\u5408\u306e\u307f\u6709\u52b9\u3002<\/p>\n<p>\u2461 two phase lock<\/p>\n<p>\u2776shared\u3068exclusive\u306e\u30e2\u30fc\u30c9\u3092\u6301\u3064lock + \u2777predicate lock\u304brange lock\u3067\u5b9f\u73fe\u3059\u308b\u3002<\/p>\n<p>\u2776\u5404\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u3001shared\/exclusive\u306e\u4e8c\u3064\u306e\u30e2\u30fc\u30c9\u3092\u6301\u3064lock\u3092\u6301\u3064\u3002<\/p>\n<p>\u8aad\u307f\u8fbc\u307f\u6642\u306b\u306f\u3001shared mode\u306e\u30ed\u30c3\u30af\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002shared mode\u306e\u30ed\u30c3\u30af\u306f\u8907\u6570\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u3001\u540c\u6642\u306b\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<br \/>\n\u66f8\u304d\u8fbc\u307f\u6642\u306b\u306f\u3001exclusive mode\u306e\u30ed\u30c3\u30af\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\u3082\u3057(\u3044\u305a\u308c\u306e\u30e2\u30fc\u30c9\u3060\u3068\u3057\u3066\u3082)\u30ed\u30c3\u30af\u304c\u4ed6\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306b\u3088\u3063\u3066\u53d6\u5f97\u3055\u308c\u3066\u3044\u305f\u3089\u3001\u5f85\u3064\u3002<br \/>\n\u30ed\u30c3\u30af\u3092\u53d6\u5f97\u3057\u305f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7d42\u4e86\u307e\u3067\u305d\u306e\u30ed\u30c3\u30af\u3092\u4fdd\u6301\u3057\u7d9a\u3051\u308b\u3002(\u3064\u307e\u308a\u3001shared mode lock\u3092\u53d6\u5f97\u3057\u305f\u307e\u307e\u5f85\u3061\u72b6\u614b\u306b\u5165\u308b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3082\u3042\u308a\u305d\u3046)<br \/>\n? \u66f8\u304d\u8fbc\u307f\u306f\u4ed6\u306e\u66f8\u304d\u8fbc\u307f\u3082\u8aad\u307f\u53d6\u308a\u3082\u30d6\u30ed\u30c3\u30af\u3059\u308b\u3002\u8aad\u307f\u53d6\u308a\u306f\u4ed6\u306e\u66f8\u304d\u8fbc\u307f\u306e\u307f\u30d6\u30ed\u30c3\u30af\u3059\u308b\u3002<br \/>\n\u30c7\u30c3\u30c9\u30ed\u30c3\u30af\u306fDB\u306b\u3088\u3063\u3066\u81ea\u52d5\u691c\u51fa\u3055\u308c\u3001\u3044\u305a\u308c\u304b\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u4e2d\u65ad\u3055\u308c\u308b\u3002\u30ea\u30c8\u30e9\u30a4\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u660e\u793a\u7684\u306b\u884c\u3046\u3002<br \/>\n\u26a0\ufe0f \u3053\u308c\u3060\u3051\u3060\u3068\u30d5\u30a1\u30f3\u30c8\u30e0\u306f\u767a\u751f\u3057\u3046\u308b -&gt; predicate\/range lock\u3067\u5bfe\u5fdc\u3002<\/p>\n<p>\u2777predicate lock\u304brange lock\u306b\u3088\u3063\u3066\u30d5\u30a1\u30f3\u30c8\u30e0\u306e\u767a\u751f\u3092\u9632\u3050\u3002<\/p>\n<p>predicate lock(\u8ff0\u8a9e\u30ed\u30c3\u30af)<\/p>\n<p>\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3A\u5185\u3067\u8aad\u307f\u8fbc\u307f\u306e\u305f\u3081\u306bSELECT\u6587\u306b\u3088\u3063\u3066\u691c\u7d22\u3092\u3057\u305f\u5834\u5408\u3001\u305d\u306e\u691c\u7d22\u6761\u4ef6\u306b\u30de\u30c3\u30c1\u3059\u308b\u96c6\u5408\u306b\u5bfe\u3059\u308b\u5171\u6709\u30ed\u30c3\u30af(=\u8ff0\u8a9e\u30ed\u30c3\u30af)\u3092\u53d6\u308b\u3002\u3053\u306e\u96c6\u5408\u304c\u4e0d\u5909\u306b\u306a\u308b\u3053\u3068\u3092\u4fdd\u969c\u3057\u305f\u3044\u3002<\/p>\n<p>\u305d\u3082\u305d\u3082\u3001\u305d\u306e\u96c6\u5408\u5185\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u6392\u4ed6\u30ed\u30c3\u30af\u304c\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3B\u306b\u3088\u3063\u3066\u53d6\u3089\u308c\u3066\u3044\u305f\u3089\u3001A\u306fB\u306e\u7d42\u4e86\u3092\u5f85\u3064\u3002<br \/>\nC\u304c\u633f\u5165or\u66f4\u65b0or\u524a\u9664\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304cA\u306e\u8ff0\u8a9e\u30ed\u30c3\u30af\u306b\u30de\u30c3\u30c1\u3057\u3066\u3044\u308b\u5834\u5408\u3001C\u306fA\u306e\u7d42\u4e86\u3092\u5f85\u3064\u3002<\/p>\n<p>?\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u3088\u304f\u306a\u3044 -&gt; \u591a\u304f\u306eDB\u3067\u306frange lock\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b<\/p>\n<p>range lock(\u7bc4\u56f2\u30ed\u30c3\u30af)<\/p>\n<p>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u5411\u4e0a\u306e\u305f\u3081\u306bpredicate lock\u306e\u30de\u30c3\u30c1\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u96c6\u5408\u3092\u5927\u304d\u304f\u3059\u308b\u3002\u30de\u30c3\u30c1\u3092\u5305\u542b\u3059\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30a8\u30f3\u30c8\u30ea\u306e\u5171\u6709\u30ed\u30c3\u30af\u3092\u53d6\u308b\u3002<br \/>\n(\u4f8b) \u8aad\u307f\u8fbc\u307f\u306e\u30af\u30a8\u30ea\u304c SELECT * FROM reservations WHERE room_id = 123 AND 22\/08\/15 &lt; start_time\u3067\u3042\u308a\u3001room_id\u30ab\u30e9\u30e0\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8cbc\u3089\u308c\u3066\u3044\u308b\u3068\u3059\u308b\u3002\u3053\u306e\u6642\u3001rood_id=123\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30a8\u30f3\u30c8\u30ea\u306e\u30ed\u30c3\u30af\u3092\u53d6\u5f97\u3059\u308b\u3002<br \/>\n\u5225\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u66f8\u304d\u8fbc\u307f\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8fbf\u3063\u3066\u66f8\u304d\u8fbc\u307f\u5bfe\u8c61\u306e\u30a8\u30f3\u30c8\u30ea\u306b\u8fbf\u308a\u7740\u304d\u3001\u305d\u308c\u304c\u5171\u6709\u30ed\u30c3\u30af\u3092\u53d6\u3089\u308c\u3066\u3044\u305f\u3089\u3001\u89e3\u653e\u3055\u308c\u308b\u307e\u3067\u5f85\u3064\u3002<br \/>\n\u7bc4\u56f2\u30ed\u30c3\u30af\u3092\u4e0e\u3048\u308b\u306e\u306b\u9069\u3057\u305f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u306a\u3044\u5834\u5408\u306b\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u30ed\u30c3\u30af\u306bfallback\u3059\u308b\u3002<\/p>\n<p>\u2462Serializable Snapshot Isolation (2008~)<\/p>\n<p>\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u5206\u96e2\u306b\u57fa\u3065\u3044\u3066\u3044\u308b\u3002\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u5185\u306e\u8aad\u307f\u53d6\u308a\u306f\u4e00\u8cab\u3057\u305fDB\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u304b\u3089\u884c\u308f\u308c\u308b\u3002<br \/>\n\u697d\u89b3\u7684\u30ed\u30c3\u30af\u3092\u53d6\u308b= \u6f5c\u5728\u7684\u306b\u5371\u967a\u306a\u3053\u3068\u304c\u751f\u3058\u3066\u3082\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u5b9f\u884c\u3092\u30d6\u30ed\u30c3\u30af\u305b\u305a\u306b\u305d\u306e\u307e\u307e\u7d99\u7d9a\u3057\u3001\u7d50\u5c40\u554f\u984c\u304c\u306a\u3063\u305f\u3053\u3068\u3092\u671f\u5f85\u3059\u308b\u3002\u554f\u984c\u304c\u3042\u308c\u3070abort\u3055\u308c\u3001retry\u304c\u5fc5\u8981\u306b\u306a\u308b\u3002<\/p>\n<p>c.f. two phase lock\u306f\u60b2\u89b3\u7684\u30ed\u30c3\u30af<br \/>\n\u6f5c\u5728\u7684\u306b\u5371\u967a\u306a\u3053\u3068\u304c\u751f\u3058\u308b = premise\u304c\u8986\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u72b6\u6cc1 = \u3042\u308b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306b\u304a\u3051\u308b\u8aad\u307f\u53d6\u308a\u5f8c\u306bDB\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u304c\u66f8\u304d\u63db\u3048\u3089\u308c\u308b\u3002(\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306f\u5b9f\u969b\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u6570\u3060\u3051\u3042\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u305f\u3081)<\/p>\n<p>\u6f5c\u5728\u7684\u306a\u5371\u967a\u2460\u3042\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u8aad\u307f\u53d6\u308a\u6642\u306b\u3001\u305d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4ed6\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306b\u3088\u308b\u672a\u30b3\u30df\u30c3\u30c8\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5b58\u5728\u3059\u308b<\/p>\n<p>\u300c\u73fe\u5728\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u8aad\u307f\u53d6\u308a\u5f8c\u306b\u66f8\u304d\u8fbc\u307f\u3092\u3057\u305f\u300d &amp;&amp; \u300c\u305d\u306e\u672a\u30b3\u30df\u30c3\u30c8\u306e\u66f8\u304d\u8fbc\u307f\u304c\u30b3\u30df\u30c3\u30c8\u3055\u308c\u305f\u3053\u3068\u3092DB\u304c\u691c\u77e5\u3055\u308c\u305f\u300d\u5834\u5408\u306b\u306f\u3001\u5b9f\u969b\u306bpremise\u304c\u8986\u3063\u3066\u3044\u308b\u3002<br \/>\n\u8aad\u307f\u53d6\u308a\u3060\u3051\u306e\u5834\u5408\u3084\u3001\u305d\u306e\u672a\u30b3\u30df\u30c3\u30c8\u306e\u66f8\u304d\u8fbc\u307f\u304c\u30b3\u30df\u30c3\u30c8\u3055\u308c\u306a\u304b\u3063\u305f\u5834\u5408\u306b\u306f\u3001premise\u306f\u8986\u3063\u3066\u3044\u306a\u3044\u3002<\/p>\n<p>\u6f5c\u5728\u7684\u306a\u5371\u967a\u2461\u3042\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u8aad\u307f\u53d6\u308a\u5f8c\u306b\u3001\u305d\u306e\u5f8c\u306e\u66f8\u304d\u8fbc\u307f\u306b\u5f71\u97ff\u3059\u308b\u53ef\u80fd\u6027\u306e\u3042\u308b\u4ed6\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306b\u3088\u308b\u66f8\u304d\u8fbc\u307f\u304c\u691c\u51fa\u3055\u308c\u305f<\/p>\n<p>\u7565<\/p>\n<p>?\ufe0f \u30e9\u30a4\u30bf\u30fc\u306f\u30ea\u30fc\u30c0\u30fc\u3092\u30d6\u30ed\u30c3\u30af\u305b\u305a\u3001\u30ea\u30fc\u30c0\u30fc\u3082\u30e9\u30a4\u30bf\u30fc\u3092\u30d6\u30ed\u30c3\u30af\u3057\u306a\u3044<\/p>\n<h1>\u7b2c8\u7ae0\uff1a\u5206\u6563\u7cfb\u7edf\u7684\u95ee\u9898\u3002<\/h1>\n<p>(\u4ee5\u4e0b\u7ed3\u6784\u7b80\u660e\u627c\u8981)<\/p>\n<p>\u4f7f\u7528\u5206\u6563\u7cfb\u7edf\u7684\u76ee\u7684\u662f\u4ec0\u4e48\uff1f<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">scalability<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">fault tolerant<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">low latency (\u30c7\u30fc\u30bf\u3092\u5730\u7406\u7684\u306b\u30e6\u30fc\u30b6\u30fc\u306e\u8fd1\u304f\u306b\u304a\u3051\u308b)<\/ul>\n<p>\u5206\u6563\u7cfb\u7edf\u53ef\u80fd\u53d1\u751f\u90e8\u5206\u6545\u969c\u3002\u5176\u539f\u56e0\u662f\uff0c<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u306e\u30d1\u30b1\u30c3\u30c8\u9001\u4fe1\u6642\u306b\u30d1\u30b1\u30c3\u30c8\u304c\u30ed\u30b9\u30c8\u3057\u305f\u308a\u9045\u5ef6\u3057\u305f\u308a\u3059\u308b\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30ce\u30fc\u30c9\u306e\u30af\u30ed\u30c3\u30af\u540c\u58eb\u304c\u305a\u308c\u3046\u308b\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30d7\u30ed\u30bb\u30b9(\u30b9\u30ec\u30c3\u30c9)\u304c\u51e6\u7406\u4e2d\u306b\u4e00\u6642\u505c\u6b62\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u3002\u304b\u3064\u81ea\u5206\u306f\u305d\u308c\u306b\u6c17\u304c\u4ed8\u3044\u3066\u3044\u306a\u3044\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>stop-the-world GC\u306b\u3088\u308b\u3082\u306e<br \/>\nVM\u306esuspend and resume\u306b\u3088\u308b\u3082\u306e<br \/>\nOS\u306b\u3088\u308bpreemptive\u306a\u30b9\u30ec\u30c3\u30c9\u5207\u308a\u66ff\u3048\u306b\u3088\u308b\u3082\u306e<br \/>\n\u30c7\u30a3\u30b9\u30afI\/O\u5f85\u3061\u306b\u3088\u308b\u3082\u306e<br \/>\nOS\u306e\u30c7\u30a3\u30b9\u30af\u3078\u306e\u30b9\u30ef\u30c3\u30d4\u30f3\u30b0(\u30da\u30fc\u30b8\u30f3\u30b0)\u51e6\u7406\u306b\u3088\u308b\u3082\u306e<\/p>\n<p>\u8bf7\u5c06\u4ee5\u4e0b\u5185\u5bb9\u7528\u4e2d\u6587\u8fdb\u884c\u540c\u4e49\u8f6c\u8ff0\uff0c\u53ea\u9700\u8981\u4e00\u79cd\u9009\u9879\uff1a<br \/>\n\u201cCan you please help me with this?\u201d<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30d3\u30b6\u30f3\u30c1\u30f3\u969c\u5bb3\u306b\u3064\u3044\u3066\u30e1\u30e2\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30d7\u30ed\u30bb\u30b9\u306e\u4e00\u6642\u505c\u6b62\u3068\u30ea\u30fc\u30b9\u3068\u30d5\u30a7\u30f3\u30b7\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u306b\u3064\u3044\u3066\u30e1\u30e2\u308b<\/ul>\n<h1>\u7b2c9\u7ae0 \u4e00\u81f4\u6027\u548c\u5171\u8bc6<\/h1>\n<h2>&#8220;\u5408\u610f&#8221;\u610f\u5473\u7740<\/h2>\n<p>\u5728\u8fbe\u6210\u5171\u8bc6(concensus)\u610f\u5473\u7740<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u5168\u3066\u306e\u30ce\u30fc\u30c9\u304c\u6c7a\u5b9a\u306b\u540c\u610f\u3059\u308b\u3088\u3046\u306a\u65b9\u6cd5\u3067\u4f55\u304b\u3092\u5b9a\u3081\u3001\u305d\u306e\u6c7a\u5b9a\u3092\u8986\u305b\u306a\u304f\u3059\u308b\u3053\u3068<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u4ee5\u4e0b\u306e\u6027\u8cea\u3092\u4fdd\u3064<\/ul>\n<\/li>\n<\/ul>\n<p>\u4e00\u69d8\u540c\u610f uniform agreement (\u5b89\u5168\u6027)<br \/>\n\u6574\u5408\u6027 integrity (\u5b89\u5168\u6027)<br \/>\n\u59a5\u5f53\u6027 validity (\u5b89\u5168\u6027)<br \/>\n\u7d42\u4e86\u6027 termination (\u30e9\u30a4\u30d6\u6027)<\/p>\n<p>\u534a\u6570\u672a\u6e80\u306e\u30ce\u30fc\u30c9\u306b\u969c\u5bb3\u304c\u3042\u3063\u3066\u3082\u4ed6\u306e\u30ce\u30fc\u30c9\u306f\u6c7a\u5b9a\u306b\u9054\u3059\u308b = \u8010\u969c\u5bb3\u6027\u3092\u5f62\u5f0f\u5316\u3057\u305f\u3082\u306e\u3002<\/p>\n<p>\u5408\u610f\u3068\u306f\u3001\u69d8\u3005\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u518d\u5229\u7528\u53ef\u80fd\u306a\u6982\u5ff5\u5206\u6563\u30b7\u30b9\u30c6\u30e0\u3067\u63d0\u4f9b\u3055\u308c\u308b\u4ee5\u4e0b\u306e\u4fdd\u969c\u3084\u62bd\u8c61\u6982\u5ff5(\u8a73\u7d30\u306f\u5f8c\u8ff0?)\u306f\u5b9f\u969b\u306b\u306f\u5408\u610f\u3068\u7b49\u4fa1\u3067\u3042\u308b\u3002<\/p>\n<p>\u7dda\u5f62\u5316\u53ef\u80fd\u306acompare-and-set\u30ec\u30b8\u30b9\u30bf<br \/>\n\u5168\u9806\u5e8f\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8<br \/>\n\u5206\u6563\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306b\u304a\u3051\u308b\u30a2\u30c8\u30df\u30c3\u30af\u306a\u30b3\u30df\u30c3\u30c8<br \/>\n\u30ed\u30c3\u30af\u3068\u30ea\u30fc\u30b9<br \/>\n\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3055\u308c\u305fDB\u306b\u304a\u3051\u308b\u30ea\u30fc\u30c0\u30fc\u9078\u51fa<br \/>\n\u5354\u8abf\u30b5\u30fc\u30d3\u30b9(ZooKeeper\u7b49)\u306b\u304a\u3051\u308b\u7dda\u5f62\u53ef\u53ef\u80fd\u3067\u30a2\u30c8\u30df\u30c3\u30af\u306a\u51e6\u7406<br \/>\n\u30e6\u30cb\u30fc\u30af\u5236\u7d04<br \/>\n?\u30b7\u30f3\u30b0\u30eb\u30ea\u30fc\u30c0\u30fc\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u66f8\u304d\u8fbc\u307f\u6642\u306b\u5408\u610f\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u4e0d\u8981\uff01\u3057\u304b\u3057\u3001\u30ea\u30fc\u30c0\u30fc\u30b7\u30c3\u30d7\u306e\u7ba1\u7406\u3084\u5909\u66f4\u306e\u5bfe\u5fdc\u306e\u305f\u3081\u306b\u5fc5\u8981\u3067\u3042\u308b?<br \/>\n?\u30ea\u30fc\u30c0\u30fc\u30ec\u30b9\u3084\u30de\u30eb\u30c1\u30ea\u30fc\u30c0\u30fc\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b7\u30b9\u30c6\u30e0\u306f\u901a\u5e38\u30b0\u30ed\u30fc\u30d0\u30eb\u306a\u540c\u610f\u3092\u7528\u3044\u306a\u3044 -&gt; \u885d\u7a81\u304c\u767a\u751f\u3059\u308b\u3002\u304c\u554f\u984c\u306a\u3044\u3002<\/p>\n<p>?\u5185\u90e8\u7684\u306a\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306f\u305d\u308c\u305e\u308c\u306e\u7528\u9014\u3067\u898b\u3066\u3044\u304f\u3002<br \/>\n?\ufe0f\u5408\u610f\u306b\u306f\u4ee5\u4e0b\u306e\u9650\u754c\u304c\u3042\u308b<\/p>\n<p>\u51e6\u7406\u3092\u884c\u3046\u4e0a\u3067\u53b3\u5bc6\u306a\u904e\u534a\u6570\u3092\u5fc5\u8981\u3068\u3059\u308b\u3002\u534a\u6570\u4ee5\u4e0b\u306e\u30ce\u30fc\u30c9\u304b\u3089\u306a\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304c\u5206\u96e2\u3055\u308c\u308b\u3068\u3001\u305d\u308c\u3089\u306f\u30d6\u30ed\u30c3\u30af\u3055\u308c\u308b\u3002<br \/>\n\u30ce\u30fc\u30c9\u306e\u8ffd\u52a0\u3084\u524a\u9664\u306f\u7c21\u5358\u306b\u884c\u3048\u306a\u3044\u3002<br \/>\n\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u554f\u984c\u306b\u3088\u308a\u969c\u5bb3\u4e2d\u306e\u30ce\u30fc\u30c9\u306e\u691c\u51fa\u3092\u8aa4\u5224\u5b9a\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002\u3053\u306e\u5834\u5408\u3001\u30ea\u30fc\u30c0\u30fc\u306e\u9078\u51fa\u3092\u7e70\u308a\u8fd4\u3057\u884c\u3046\u305f\u3081\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u60aa\u5316\u3059\u308b\u3002<\/p>\n<h2>\u5728\u5206\u6563\u7cfb\u7edf\u4e2d\u63d0\u4f9b\u7684\u4fdd\u8bc1\u548c\u62bd\u8c61\u6982\u5ff5\u662f\u901a\u8fc7\u4f7f\u7528\u5171\u8bc6\u7b97\u6cd5\u5b9e\u73b0\u7684\u3002<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u7dda\u5f62\u5316\u53ef\u80fd\u6027(linearizability)\u306f\u3001\u5f37\u3044\u4e00\u8cab\u6027\u30e2\u30c7\u30eb<\/ul>\n<\/li>\n<\/ul>\n<p>\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3055\u308c\u305f\u30c7\u30fc\u30bf(\u30aa\u30d6\u30b8\u30a7\u30af\u30c8)\u304c\u3001\u3042\u305f\u304b\u3082\u30c7\u30fc\u30bf\u306e\u30b3\u30d4\u30fc\u304c\u4e00\u3064\u3057\u304b\u306a\u3044\u304b\u306e\u3088\u3046\u306b\u898b\u3048\u3001\u305d\u306e\u30c7\u30fc\u30bf\u306b\u5bfe\u3059\u308b\u64cd\u4f5c\u304c\u30a2\u30c8\u30df\u30c3\u30af\u306b\u50cd\u304f\u3002\u3064\u307e\u308a\u3001\u6700\u65b0\u6027\u306e\u4fdd\u8a3c\u3002<br \/>\n\u5b9a\u7fa9<\/p>\n<p>\u3042\u308b\u8aad\u307f\u8fbc\u307f\/\u66f8\u304d\u8fbc\u307f\u51e6\u7406A -&gt; B\u306e\u5b9f\u884c\u6642\u9593\u5e2f\u304c\u88ab\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u3001B\u306e\u64cd\u4f5c\u306fA\u304c\u53cd\u6620\u3055\u308c\u305f\u72b6\u614b\u306eDB\u306b\u5bfe\u3057\u3066\u884c\u308f\u308c\u308b\u3002<br \/>\nA\u3068B\u306e\u5b9f\u884c\u6642\u9593\u5e2f\u304c\u88ab\u3063\u3066\u3044\u308b(\u4e26\u884c\u3057\u3066\u3044\u308b)\u5834\u5408\u306b\u306f\u3001\u305d\u308c\u3089\u306e\u64cd\u4f5c\u306e\u9806\u756a\u306f\u554f\u308f\u308c\u306a\u3044\u3002<\/p>\n<p>\u5177\u4f53\u7684\u306a\u7528\u9014\u306f<\/p>\n<p>\u30ea\u30fc\u30c0\u30fc\u9078\u51fa\u306e\u305f\u3081\u306e\u5206\u6563\u30ed\u30c3\u30af<br \/>\nDB\u306e\u30e6\u30cb\u30fc\u30af\u5236\u7d04<br \/>\n\u30af\u30ed\u30b9\u30c1\u30e3\u30f3\u30cd\u30eb\u30bf\u30a4\u30df\u30f3\u30b0\u4f9d\u5b58\u95a2\u4fc2<\/p>\n<p>\u5b9f\u88c5\u65b9\u6cd5<\/p>\n<p>?\u300c\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u6301\u305f\u306a\u3044\u300d\u306e\u306f\u8010\u969c\u5bb3\u6027\u304c\u5931\u308f\u308c\u308b\u306e\u3067\u306a\u3057\u3002<br \/>\n\u7565<\/p>\n<p>\u7dda\u5f62\u5316\u53ef\u80fd\u306b\u3059\u308b\u3053\u3068\u306e\u30b3\u30b9\u30c8<\/p>\n<p>\u53ef\u7528\u6027(Availability)\u304c\u5931\u308f\u308c\u308b<\/p>\n<p>CAP\u5b9a\u7406\u306f\u300c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u5206\u65ad\u304c\u767a\u751f\u3057\u305f\u3068\u304d\u306bC(\uff1d\u7dda\u5f62\u53ef\u80fd\u6027)\u3068A\u306e\u3044\u305a\u308c\u304b\u3057\u304b\u62c5\u4fdd\u3067\u304d\u306a\u3044\u300d\u3053\u3068\u3092\u8868\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u843d\u3061\u308b<\/p>\n<p>\u591a\u304f\u306eDB\u3067C\u3092\u72a0\u7272\u306b\u3059\u308b\u7406\u7531\u306fA\u306e\u62c5\u4fdd\u3067\u306f\u306a\u304f\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u60aa\u5316\u9632\u6b62<\/p>\n<p>\u56e0\u679c\u5f8b\u306f\u3001\u5f31\u3044\u4e00\u8cab\u6027\u30e2\u30c7\u30eb<\/p>\n<p>\u30a4\u30d9\u30f3\u30c8\u306b\u9806\u5e8f\u3092\u6301\u3061\u8fbc\u3080<\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u5c65\u6b74\u306f\u5206\u5c90\u3068\u5408\u6d41\u3092\u3082\u3064\u6642\u7cfb\u5217(\u4e26\u5217\u306b\u884c\u308f\u308c\u308b\u51e6\u7406\u3082\u3042\u308b)<\/p>\n<p>\u300c\u30b7\u30b9\u30c6\u30e0\u306b\u5fc5\u8981\u306a\u306e\u306f\u5b9f\u306f\u7dda\u5f62\u53ef\u80fd\u6027\u3067\u306f\u306a\u304f\u3001\u56e0\u679c\u5f8b\u306b\u304a\u3051\u308b\u4e00\u8cab\u6027\u300d\u3060\u3068\u3044\u3046\u5834\u5408\u3082\u591a\u3044\u3002<br \/>\n\u7dda\u5f62\u5316\u53ef\u80fd\u6027\u307b\u3069\u306e\u8abf\u6574\u306e\u305f\u3081\u306e\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u3092\u6301\u305f\u305a\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u554f\u984c\u3082\u7dda\u5f62\u5316\u53ef\u80fd\u6027\u307b\u3069\u654f\u611f\u3067\u306f\u306a\u3044\u3002<br \/>\n\u5b9f\u88c5<\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u306e\u305f\u3081\u306b\u3001\u30e9\u30f3\u30dd\u30fc\u30c8\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7 (counter, node id) \u3092\u7528\u3044\u308b<\/p>\n<p>?\ufe0f\u64cd\u4f5c\u306e\u5168\u9806\u5e8f\u304c\u6c7a\u307e\u308b\u306e\u306f\u5168\u3066\u306e\u64cd\u4f5c\u304c\u53ce\u96c6\u3067\u304d\u305f\u5f8c\u3067\u3042\u308b\uff1d\u3042\u308b\u30a4\u30d9\u30f3\u30c8\u767a\u751f\u6642\u306b\u4ed6\u306e\u30ce\u30fc\u30c9\u3067\u305d\u3053\u307e\u3067\u306b\u767a\u751f\u3057\u305f\u30a4\u30d9\u30f3\u30c8\u306e\u5168\u3066\u3092\u5f97\u3089\u308c\u308b\u8a33\u3067\u306f\u306a\u3044 \u2192 \u3042\u308b\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u53d7\u4fe1\u6642\u306b\u5373\u5ea7\u306b\u6210\u529f\u304b\u306e\u5224\u65ad\u306f\u3067\u304d\u306a\u3044\u3002<\/p>\n<p>\u274e\u7d50\u679c\u6574\u5408\u6027(eventual consistency)\u306f\u5f31\u3044\u4fdd\u8a3c\u3067\u3042\u308a\u3001\u3053\u308c\u306f\u5408\u610f\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5fc5\u8981\u3068\u3057\u306a\u3044(?)<br \/>\n\u5168\u9806\u5e8f\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8<\/p>\n<p>\u30ce\u30fc\u30c9\u9593\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u4ea4\u63db\u30d7\u30ed\u30c8\u30b3\u30eb<br \/>\n\u4ee5\u4e0b\u306e\u5b89\u5168\u6027\u304c\u5e38\u306b\u6e80\u305f\u3055\u308c\u308b\u3002<\/p>\n<p>(\u4fe1\u983c\u6027)\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u53b3\u5bc6\u306b\u4e00\u5ea6\u3060\u3051\u5168\u3066\u306e\u30ce\u30fc\u30c9\u3078\u914d\u4fe1\u3055\u308c\u308b<br \/>\n(\u9806\u5e8f\u4ed8\u3051)\u5168\u3066\u306e\u30ce\u30fc\u30c9\u306f\u3001\u540c\u3058\u9806\u5e8f\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d7\u4fe1\u3059\u308b<\/p>\n<p>\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u914d\u4fe1\u3055\u308c\u305f\u6642\u70b9\u3067\u9806\u5e8f\u304c\u78ba\u5b9a\u3055\u308c\u308b<br \/>\n\u4f7f\u7528\u3055\u308c\u308b\u4f8b<\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3<br \/>\nZooKeeper\u3084etcd<br \/>\nserializable\u306a\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3<br \/>\n\u30d5\u30a7\u30f3\u30b7\u30f3\u30b0\u30c8\u30fc\u30af\u30f3\u3092\u63d0\u4f9b\u3059\u308b\u30ed\u30c3\u30af\u30b5\u30fc\u30d3\u30b9\u306e\u5b9f\u88c5<br \/>\nlinearizable\u306a\u3001\u30a2\u30c8\u30df\u30c3\u30af\u306acompare-and-set\u64cd\u4f5c<\/p>\n<p>\u5168\u9806\u5e8f\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8\u3092append\u306e\u307f\u304c\u884c\u308f\u308c\u308b\u30ed\u30b0\u3068\u3057\u3066\u4f7f\u7528\u2b50<\/p>\n<p>\u5b9f\u88c5\u65b9\u6cd5<\/p>\n<p>linearizable\u306a\u30b7\u30fc\u30af\u30a8\u30f3\u30b9\u756a\u53f7\u751f\u6210\u5668\u3067\u3001\u5404\u30ce\u30fc\u30c9\u306f\u51e6\u7406\u306e\u30b7\u30fc\u30af\u30a8\u30f3\u30b9\u756a\u53f7\u3092\u767a\u884c\u3057\u3066\u3082\u3089\u3044\u3001\u305d\u306e\u9806\u756a\u306b\u5404\u30ce\u30fc\u30c9\u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u9001\u4fe1\u3092\u884c\u3046\u3002\u305f\u3060\u3057\u305d\u306e\u751f\u6210\u5668\u306e\u5197\u9577\u5316\u306e\u305f\u3081\u306b\u306f\u307e\u305f\u5408\u610f\u304c\u5fc5\u8981\u3067\u3042\u308b\u3002<\/p>\n<p>\u5206\u6563\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3<\/p>\n<p>?\u591a\u304f\u306eNoSQL\u5206\u6563DB\u3067\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u304c\u3001\u69d8\u3005\u306a\u30af\u30e9\u30b9\u30bf\u5316\u3055\u308c\u305fRDB\u3067\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b<br \/>\n\u30a2\u30c8\u30df\u30c3\u30af\u306a\u30b3\u30df\u30c3\u30c8\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\u540c\u610f\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u7528\u3044\u3089\u308c\u3066\u3044\u308b\u3002<br \/>\n\u30a2\u30c8\u30df\u30c3\u30af\u306a\u30b3\u30df\u30c3\u30c8\u304c\u6709\u7528\u306a\u30b1\u30fc\u30b9\u306f<\/p>\n<p>\u30de\u30eb\u30c1\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3<br \/>\n\u30bb\u30ab\u30f3\u30c0\u30ea\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u4f5c\u6210\u6642<\/p>\n<p>\u30a2\u30c8\u30df\u30c3\u30af\u306a\u30b3\u30df\u30c3\u30c8\u306e\u5b9f\u88c5<\/p>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306f\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u306b\u6e21\u308b\u3002\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u306f\u5404\u30ce\u30fc\u30c9\u3078 \u4ee5\u4e0b\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u884c\u3046\u3002<br \/>\n\u2460\u30c7\u30fc\u30bf\u306e\u66f8\u304d\u8fbc\u307f\u4f9d\u983c<\/p>\n<p>\u3053\u308c\u3092\u53d7\u3051\u53d6\u3063\u305f\u6642\u70b9\u3067\u5404\u30ce\u30fc\u30c9\u306f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u958b\u59cb\u3059\u308b\u3002<\/p>\n<p>\u2461(P1)\u30b3\u30df\u30c3\u30c8\u53ef\u80fd\u304b\u8cea\u554f(\u3044\u304b\u306a\u308b\u5834\u5408\u3067\u3082\u53ef\u80fd\u306a\u3089\u30ce\u30fc\u30c9\u306fyes\u304c\u8fd4\u3059)<\/p>\n<p>\u3053\u3053\u3067yes\u3092\u8fd4\u3057\u305f\u30ce\u30fc\u30c9\u306f\u305d\u306e\u5f8c\u7d76\u5bfe\u306b\u30b3\u30df\u30c3\u30c8\u3092\u884c\u3046\u7fa9\u52d9\u3092\u8ffd\u3046\u3002<\/p>\n<p>\uff70\uff70\uff70\u30b3\u30df\u30c3\u30c8\u30dd\u30a4\u30f3\u30c8\uff70\uff70\uff70<\/p>\n<p>\u3053\u3053\u3092\u8d8a\u3048\u305f\u6642\u70b9\u3067\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u306f\u7d76\u5bfe\u306b\u5168\u3066\u306e\u30ce\u30fc\u30c9\u3078\u30b3\u30df\u30c3\u30c8\u4f9d\u983c\u3092\u9001\u308a\u5c4a\u3051\u308b(\u30ea\u30c8\u30e9\u30a4\u542b\u3081\u308b)\u7fa9\u52d9\u3092\u8ffd\u3046\u3002<br \/>\n\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u306f\u4e2d\u65ad\u3059\u308b\u304b\u306e\u5224\u65ad\u3092\u30c7\u30a3\u30b9\u30af\u4e0a\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30ed\u30b0\u306b\u66f8\u304d\u8fbc\u3080?<\/p>\n<p>\u2462(P2)\u30b3\u30df\u30c3\u30c8\u4f9d\u983c<\/p>\n<p>X\/Open XA\u306b\u6e96\u62e0\u3059\u308bDB, \u30e1\u30c3\u30bb\u30fc\u30b8\u30d6\u30ed\u30fc\u30ab\u30fcetc\u3092\u7528\u3044\u308b\u3053\u3068\u3067\u30012\u3064\u4ee5\u4e0a\u306e\u7570\u306a\u308b\u6280\u8853\u3092\u5229\u7528\u3057\u3066\u5206\u6563\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e2 phase commit\u3092\u5b9f\u73fe\u3067\u304d\u308b\u3002<br \/>\n?\ufe0f\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u826f\u304f\u306a\u3044\u3002<\/p>\n<p>?\u306e\u30c7\u30a3\u30b9\u30af\u66f8\u304d\u8fbc\u307f<br \/>\n\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u30e9\u30a6\u30f3\u30c9\u30c8\u30ea\u30c3\u30d7\u306e\u5897\u52a0<\/p>\n<p>?\ufe0f\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u304c\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u305f\u5834\u5408\u3001\u5404\u30ce\u30fc\u30c9\u306f\u95a2\u4fc2\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u306e\u30ed\u30c3\u30af\u3092\u53d6\u308a\u7d9a\u3051\u308b\u3053\u3068\u306b\u306a\u308b\u3002\u3053\u306e\u5834\u5408\u3001\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u306e\u30ea\u30ab\u30d0\u30ea\u30fc\u3092\u5f85\u3064\u5fc5\u8981\u304c\u3042\u308b\u3002<br \/>\n?\ufe0f\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u304c\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u3082\u305f\u306a\u3044\u5834\u5408\u3001\u3053\u308c\u304c\u5358\u4e00\u969c\u5bb3\u70b9\u306b\u306a\u308b\u3002<\/p>\n<p>ZooKeeper\u3084etcd<\/p>\n<p>\u30a4\u30f3\u30e1\u30e2\u30ea\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5206\u6563\u30ad\u30fc\u30d0\u30ea\u30e5\u30fc\u30b9\u30c8\u30a2\u3002(\u305f\u3060\u3057\u6c38\u7d9a\u5316\u306e\u305f\u3081\u306b\u30c7\u30a3\u30b9\u30af\u66f8\u304d\u8fbc\u307f\u306f\u884c\u308f\u308c\u308b)<br \/>\n\u30c7\u30fc\u30bf\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u8010\u969c\u5bb3\u6027\u3092\u6301\u3064\u5168\u9806\u5e8f\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306b\u3088\u3063\u3066\u884c\u308f\u308c\u308b\u3002<\/p>\n<p>\u63d0\u4f9b\u3059\u308b\u6a5f\u80fd\u306f\u4ee5\u4e0b\u3002\u3053\u308c\u3089\u306f\u5206\u6563\u5354\u8abf\u306b\u4f7f\u7528\u3055\u308c\u308b\u3002<\/p>\n<p>\u30ed\u30c3\u30af\u3002?\ufe0flinearizable\u3067\u30a2\u30c8\u30df\u30c3\u30af\u306a\u64cd\u4f5c\u3092\u5229\u7528\u3057\u3066\u5b9f\u88c5\u3055\u308c\u308b\u3002 \u2b50\u540c\u610f\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3002<br \/>\n\u30ed\u30c3\u30af\/\u30ea\u30fc\u30b9\u00d7\u30d7\u30ed\u30bb\u30b9\u306e\u4e00\u6642\u505c\u6b62\u306b\u8d77\u56e0\u3059\u308b\u30ec\u30fc\u30b9\u30b3\u30f3\u30c7\u30a3\u30b7\u30e7\u30f3\u3092\u9632\u3050\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u30d5\u30a7\u30f3\u30b7\u30f3\u30b0\u30c8\u30fc\u30af\u30f3\u306e\u767a\u884c\u3002?\ufe0f\u64cd\u4f5c\u306e\u5168\u9806\u5e8f\u4ed8\u3051\u3092\u884c\u3046\u3053\u3068\u3067\u5b9f\u73fe\u3055\u308c\u308b\u3002<\/p>\n<p>zookeeper\u30b5\u30fc\u30d0\u30fc\u306b\u63a5\u7d9a\u4e2d\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u969c\u5bb3\u691c\u51fa\u3002?\ufe0f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u5b9a\u671f\u7684\u306b\u9001\u4fe1\u3059\u308b\u30cf\u30fc\u30c8\u30d3\u30fc\u30c8\u306e\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u306b\u3088\u3063\u3066\u691c\u77e5\u3055\u308c\u308b\u3002<br \/>\n\u4ed6\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u65b0\u305f\u306a\u53c2\u52a0\u3084\u3001\u4ed6\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3067\u306e\u969c\u5bb3\u767a\u751f\u7b49\u304c\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3078\u901a\u77e5\u3055\u308c\u308b\u3002(\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u81ea\u3089\u30dd\u30fc\u30ea\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u306f\u306a\u3044)<\/p>\n<p>\u7528\u9014<\/p>\n<p>\u5354\u8abf\u53ca\u3073\u8a2d\u5b9a\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u306e\u4f7f\u7528\u3002\u5229\u7528\u4f8b\u306f\u4ee5\u4e0b\u3002(\u5408\u610f\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u81ea\u5206\u3067\u5b9f\u88c5\u3057\u306a\u304f\u3066\u826f\u3044)<\/p>\n<p>\u30ea\u30fc\u30c0\u30fc\u306e\u9078\u51fa<br \/>\n\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3055\u308c\u305f\u30ea\u30bd\u30fc\u30b9\u306b\u304a\u3044\u3066\u3001\u3069\u306e\u30ce\u30fc\u30c9\u306b\u3069\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u5272\u308a\u5f53\u3066\u308b\u304b\u306e\u5224\u65ad<\/p>\n<p>\u30b5\u30fc\u30d3\u30b9\u30c7\u30a3\u30b9\u30ab\u30d0\u30ea\u306e\u305f\u3081\u306b\u5229\u7528<\/p>\n<p>\uff1d \u7279\u5b9a\u306e\u30b5\u30fc\u30d3\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306e\u306b\u63a5\u7d9a\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044IP\u30a2\u30c9\u30ec\u30b9\u3092\u77e5\u308b\u305f\u3081\u306b\u4f7f\u7528\u3002<br \/>\n\u3053\u308c\u306f\u5408\u610f\u3092\u5fc5\u8981\u3068\u3057\u306a\u3044\u3002<\/p>\n<p>\u30e1\u30f3\u30d0\u30fc\u30b7\u30c3\u30d7\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u306e\u5229\u7528<\/p>\n<p>\uff1d\u30a2\u30af\u30c6\u30a3\u30d6\u3067\u30af\u30e9\u30b9\u30bf\u306e\u30e1\u30f3\u30d0\u30fc\u3068\u306a\u3063\u3066\u3044\u308b\u30ce\u30fc\u30c9\u3092\u5224\u65ad\u3059\u308b\u3002<br \/>\n\u5408\u610f\u3068\u969c\u5bb3\u691c\u51fa\u3092\u7d44\u307f\u5408\u308f\u305b\u3001\u4ed6\u306e\u30ce\u30fc\u30c9\u306b\u969c\u5bb3\u304c\u767a\u751f\u3057\u3066\u304d\u308b\u304b\u3092\u30ce\u30fc\u30c9\u9593\u3067\u540c\u610f\u3059\u308b\u3002<\/p>\n<p>\u4e8b\u52a1\u9694\u79bb\u7684\u76ee\u7684\u662f\u4e3a\u4e86\u907f\u514d\u7531\u4e8e\u5e76\u53d1\u8fdb\u884c\u4e8b\u52a1\u800c\u5bfc\u81f4\u7684\u7ade\u4e89\u6761\u4ef6\u3002\u5206\u5e03\u4e00\u81f4\u6027\u7684\u76ee\u7684\u662f\u4e3a\u4e86\u8c03\u6574\u526f\u672c\u7684\u72b6\u6001\uff0c\u4ee5\u5e94\u5bf9\u5ef6\u8fdf\u548c\u6545\u969c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56e0\u4e3a\u9605\u8bfb\u4e86\uff0c\u6240\u4ee5\u7559\u4e0b\u4e86\u4e2a\u4eba\u5907\u5fd8\u5f55\u3002 \u6b64\u5907\u5fd8\u5f55\u4e0d\u662f\u8be6\u5c3d\u65e0\u9057\u7684\u3002 1~4\u7ae0\u300c\u30c7\u30fc\u30bf\u6307\u5411\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30b6\u30a4\u30f3\u300d\u7b2c [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-50588","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6211\u8bfb\u4e86\u300a\u6570\u636e\u9a71\u52a8\u5e94\u7528\u8bbe\u8ba1\u300b\u7b2c\u4e8c\u90e8\uff08\u5206\u5e03\u5f0f\u6570\u636e\uff09 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u8bfb\u4e86\u300a\u6570\u636e\u9a71\u52a8\u5e94\u7528\u8bbe\u8ba1\u300b\u7b2c\u4e8c\u90e8\uff08\u5206\u5e03\u5f0f\u6570\u636e\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6211\u8bfb\u4e86\u300a\u6570\u636e\u9a71\u52a8\u5e94\u7528\u8bbe\u8ba1\u300b\u7b2c\u4e8c\u90e8\uff08\u5206\u5e03\u5f0f\u6570\u636e\uff09\" \/>\n<meta property=\"og:description\" content=\"\u56e0\u4e3a\u9605\u8bfb\u4e86\uff0c\u6240\u4ee5\u7559\u4e0b\u4e86\u4e2a\u4eba\u5907\u5fd8\u5f55\u3002 \u6b64\u5907\u5fd8\u5f55\u4e0d\u662f\u8be6\u5c3d\u65e0\u9057\u7684\u3002 1~4\u7ae0\u300c\u30c7\u30fc\u30bf\u6307\u5411\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30b6\u30a4\u30f3\u300d\u7b2c [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u8bfb\u4e86\u300a\u6570\u636e\u9a71\u52a8\u5e94\u7528\u8bbe\u8ba1\u300b\u7b2c\u4e8c\u90e8\uff08\u5206\u5e03\u5f0f\u6570\u636e\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-29T11:03:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T09:18:08+00:00\" \/>\n<meta name=\"author\" content=\"\u79d1, \u9896\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u9896\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/\",\"name\":\"\u6211\u8bfb\u4e86\u300a\u6570\u636e\u9a71\u52a8\u5e94\u7528\u8bbe\u8ba1\u300b\u7b2c\u4e8c\u90e8\uff08\u5206\u5e03\u5f0f\u6570\u636e\uff09 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2024-01-29T11:03:20+00:00\",\"dateModified\":\"2024-04-29T09:18:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6211\u8bfb\u4e86\u300a\u6570\u636e\u9a71\u52a8\u5e94\u7528\u8bbe\u8ba1\u300b\u7b2c\u4e8c\u90e8\uff08\u5206\u5e03\u5f0f\u6570\u636e\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\",\"name\":\"\u79d1, \u9896\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u9896\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u6211\u8bfb\u4e86\u300a\u6570\u636e\u9a71\u52a8\u5e94\u7528\u8bbe\u8ba1\u300b\u7b2c\u4e8c\u90e8\uff08\u5206\u5e03\u5f0f\u6570\u636e\uff09 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u8bfb\u4e86\u300a\u6570\u636e\u9a71\u52a8\u5e94\u7528\u8bbe\u8ba1\u300b\u7b2c\u4e8c\u90e8\uff08\u5206\u5e03\u5f0f\u6570\u636e\/","og_locale":"zh_CN","og_type":"article","og_title":"\u6211\u8bfb\u4e86\u300a\u6570\u636e\u9a71\u52a8\u5e94\u7528\u8bbe\u8ba1\u300b\u7b2c\u4e8c\u90e8\uff08\u5206\u5e03\u5f0f\u6570\u636e\uff09","og_description":"\u56e0\u4e3a\u9605\u8bfb\u4e86\uff0c\u6240\u4ee5\u7559\u4e0b\u4e86\u4e2a\u4eba\u5907\u5fd8\u5f55\u3002 \u6b64\u5907\u5fd8\u5f55\u4e0d\u662f\u8be6\u5c3d\u65e0\u9057\u7684\u3002 1~4\u7ae0\u300c\u30c7\u30fc\u30bf\u6307\u5411\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30b6\u30a4\u30f3\u300d\u7b2c [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u8bfb\u4e86\u300a\u6570\u636e\u9a71\u52a8\u5e94\u7528\u8bbe\u8ba1\u300b\u7b2c\u4e8c\u90e8\uff08\u5206\u5e03\u5f0f\u6570\u636e\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-01-29T11:03:20+00:00","article_modified_time":"2024-04-29T09:18:08+00:00","author":"\u79d1, \u9896","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u9896","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/","name":"\u6211\u8bfb\u4e86\u300a\u6570\u636e\u9a71\u52a8\u5e94\u7528\u8bbe\u8ba1\u300b\u7b2c\u4e8c\u90e8\uff08\u5206\u5e03\u5f0f\u6570\u636e\uff09 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2024-01-29T11:03:20+00:00","dateModified":"2024-04-29T09:18:08+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u6211\u8bfb\u4e86\u300a\u6570\u636e\u9a71\u52a8\u5e94\u7528\u8bbe\u8ba1\u300b\u7b2c\u4e8c\u90e8\uff08\u5206\u5e03\u5f0f\u6570\u636e\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e","name":"\u79d1, \u9896","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","caption":"\u79d1, \u9896"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e8%af%bb%e4%ba%86%e3%80%8a%e6%95%b0%e6%8d%ae%e9%a9%b1%e5%8a%a8%e5%ba%94%e7%94%a8%e8%ae%be%e8%ae%a1%e3%80%8b%e7%ac%ac%e4%ba%8c%e9%83%a8%ef%bc%88%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/50588","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=50588"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/50588\/revisions"}],"predecessor-version":[{"id":86588,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/50588\/revisions\/86588"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=50588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=50588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=50588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}