{"id":81432,"date":"2026-07-25T01:42:09","date_gmt":"2026-07-24T17:42:09","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/81432.html"},"modified":"2026-07-25T01:42:09","modified_gmt":"2026-07-24T17:42:09","slug":"day-7-%e9%ab%98%e5%8f%af%e7%94%a8%e4%b8%8e%e8%b4%9f%e8%bd%bd%e5%9d%87%e8%a1%a1%ef%bc%88%e4%b8%8a%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/81432.html","title":{"rendered":"Day 7 - \u9ad8\u53ef\u7528\u4e0e\u8d1f\u8f7d\u5747\u8861\uff08\u4e0a\uff09"},"content":{"rendered":"<\/p>\n<h4>\u76ee\u5f55<\/h4>\n<ul>\n<li>\u524d\u8a00<\/li>\n<li>\u4e00\u3001LVS\u8d1f\u8f7d\u5747\u8861<\/li>\n<li>\u4e8c\u3001LVS-NAT \u6a21\u5f0f\u642d\u5efa<\/li>\n<li>\u4e09\u3001keepalived\u9ad8\u53ef\u7528<\/li>\n<li>\u56db\u30017\u5c42\u8d1f\u8f7d\u5747\u8861<\/li>\n<li>\u603b\u7ed3<\/li>\n<\/ul>\n<hr \/>\n<h2>\u524d\u8a00<\/h2>\n<p>\u5728\u5f53\u4eca\u9ad8\u5e76\u53d1\u7684\u4e92\u8054\u7f51\u670d\u52a1\u67b6\u6784\u4e2d&#xff0c;\u5355\u53f0\u670d\u52a1\u5668\u5f80\u5f80\u96be\u4ee5\u627f\u53d7\u5de8\u5927\u7684\u8bbf\u95ee\u538b\u529b&#xff0c;\u4e14\u5b58\u5728\u5355\u70b9\u6545\u969c\u7684\u98ce\u9669\u3002\u8d1f\u8f7d\u5747\u8861\u6280\u672f\u5e94\u8fd0\u800c\u751f&#xff0c;\u5b83\u901a\u8fc7\u5c06\u7f51\u7edc\u8bf7\u6c42\u5206\u53d1\u5230\u591a\u53f0\u540e\u7aef\u670d\u52a1\u5668&#xff0c;\u4e0d\u4ec5\u63d0\u5347\u4e86\u7cfb\u7edf\u7684\u6574\u4f53\u5904\u7406\u80fd\u529b&#xff0c;\u4e5f\u589e\u5f3a\u4e86\u670d\u52a1\u7684\u53ef\u7528\u6027\u548c\u53ef\u9760\u6027\u3002<\/p>\n<p>Linux Virtual Server (LVS) \u4f5c\u4e3a\u4e00\u6b3e\u6210\u719f\u3001\u9ad8\u6027\u80fd\u7684\u56db\u5c42&#xff08;\u4f20\u8f93\u5c42&#xff09;\u8d1f\u8f7d\u5747\u8861\u89e3\u51b3\u65b9\u6848&#xff0c;\u51ed\u501f\u5176\u63a5\u8fd1\u7ebf\u6027\u7684\u6269\u5c55\u80fd\u529b\u548c\u6781\u4f4e\u7684\u8d44\u6e90\u5f00\u9500&#xff0c;\u5728\u5927\u578b\u7f51\u7ad9\u548c\u5173\u952e\u4e1a\u52a1\u7cfb\u7edf\u4e2d\u5f97\u5230\u4e86\u5e7f\u6cdb\u5e94\u7528\u3002\u5b83\u5de5\u4f5c\u5728 Linux \u5185\u6838\u7a7a\u95f4&#xff0c;\u901a\u8fc7 IPVS (IP Virtual Server) \u6a21\u5757\u5b9e\u73b0&#xff0c;\u652f\u6301 NAT\u3001DR\u3001TUN \u7b49\u591a\u79cd\u5de5\u4f5c\u6a21\u5f0f&#xff0c;\u80fd\u591f\u6ee1\u8db3\u4e0d\u540c\u7f51\u7edc\u73af\u5883\u4e0b\u7684\u90e8\u7f72\u9700\u6c42\u3002<\/p>\n<p>\u7136\u800c&#xff0c;\u4ec5\u9760 LVS \u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861\u8fd8\u4e0d\u591f\u3002\u5728\u5b9e\u9645\u751f\u4ea7\u73af\u5883\u4e2d&#xff0c;\u6211\u4eec\u8fd8\u9700\u8981\u8003\u8651\u8c03\u5ea6\u5668\u81ea\u8eab\u7684\u9ad8\u53ef\u7528\u6027&#xff0c;\u907f\u514d\u5176\u6210\u4e3a\u65b0\u7684\u5355\u70b9\u6545\u969c\u3002Keepalived \u6b63\u662f\u89e3\u51b3\u8fd9\u4e00\u95ee\u9898\u7684\u5229\u5668&#xff0c;\u5b83\u57fa\u4e8e VRRP \u534f\u8bae&#xff0c;\u53ef\u4ee5\u5b9e\u73b0\u4e3b\u5907\u8c03\u5ea6\u5668\u7684\u81ea\u52a8\u6545\u969c\u5207\u6362&#xff0c;\u786e\u4fdd\u670d\u52a1\u6301\u7eed\u53ef\u7528\u3002<\/p>\n<p>\u6b64\u5916&#xff0c;\u5bf9\u4e8e\u9700\u8981\u57fa\u4e8e HTTP \u5934\u90e8\u3001URL \u8def\u5f84\u7b49\u5e94\u7528\u5c42\u4fe1\u606f\u8fdb\u884c\u66f4\u7cbe\u7ec6\u8def\u7531\u7684\u573a\u666f&#xff0c;\u4e03\u5c42\u8d1f\u8f7d\u5747\u8861\u5668&#xff08;\u5982 HAProxy&#xff09;\u5219\u80fd\u63d0\u4f9b LVS \u6240\u4e0d\u5177\u5907\u7684\u7075\u6d3b\u6027\u548c\u529f\u80fd\u3002<\/p>\n<p>\u672c\u6587\u5c06\u5e26\u9886\u5927\u5bb6\u4ece\u96f6\u5f00\u59cb&#xff0c;\u4e00\u6b65\u6b65\u642d\u5efa\u4e00\u4e2a\u5b8c\u6574\u7684\u8d1f\u8f7d\u5747\u8861\u4e0e\u9ad8\u53ef\u7528\u5b9e\u9a8c\u73af\u5883\u3002\u6211\u4eec\u5c06\u6db5\u76d6&#xff1a;<\/p>\n<li>LVS-DR \u6a21\u5f0f\u642d\u5efa&#xff1a;\u4f53\u9a8c\u9ad8\u6027\u80fd\u7684\u76f4\u63a5\u8def\u7531\u6a21\u5f0f\u3002<\/li>\n<li>LVS-NAT \u6a21\u5f0f\u642d\u5efa&#xff1a;\u7406\u89e3\u7f51\u7edc\u5730\u5740\u8f6c\u6362\u6a21\u5f0f\u53ca\u5176\u9002\u7528\u573a\u666f\u3002<\/li>\n<li>\u96c6\u6210 Keepalived \u5b9e\u73b0\u9ad8\u53ef\u7528&#xff1a;\u4e3a LVS \u8c03\u5ea6\u5668\u52a0\u4e0a\u201c\u4fdd\u9669\u201d&#xff0c;\u6784\u5efa\u4e3b\u5907\u96c6\u7fa4\u3002<\/li>\n<li>HAProxy \u4e03\u5c42\u8d1f\u8f7d\u5747\u8861\u5b9e\u8df5&#xff1a;\u63a2\u7d22\u5e94\u7528\u5c42\u8d1f\u8f7d\u5747\u8861\u7684\u914d\u7f6e\u4e0e\u6548\u679c\u3002<\/li>\n<h2>\u4e00\u3001LVS\u8d1f\u8f7d\u5747\u8861<\/h2>\n<table>\n<tr>\u4e3b\u673a\u540dIP\u5730\u5740VIP\u89d2\u8272<\/tr>\n<tbody>\n<tr>\n<td>server1<\/td>\n<td>192.168.48.132<\/td>\n<td>192.168.48.100<\/td>\n<td>\u8c03\u5ea6\u5668&#xff08;VS&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>server2<\/td>\n<td>192.168.48.144<\/td>\n<td>192.168.48.100<\/td>\n<td>\u771f\u5b9e\u670d\u52a1\u5668&#xff08;RS&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>server3<\/td>\n<td>192.168.48.142<\/td>\n<td>192.168.48.100<\/td>\n<td>\u771f\u5b9e\u670d\u52a1\u5668&#xff08;RS&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>server4<\/td>\n<td>192.168.48.143<\/td>\n<td>\u2014<\/td>\n<td>\u6d4b\u8bd5\u673a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>server2 \u5b89\u88c5\u7f51\u9875\u670d\u52a1<\/p>\n<p>yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> httpd<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174205-6a63a3ed7fd4e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> server2 \u542f\u52a8\u7f51\u9875\u5e76\u5199\u5165\u5185\u5bb9<\/p>\n<p>systemctl start httpd<br \/>\n<span class=\"token builtin class-name\">echo<\/span> server2 <span class=\"token operator\">&gt;<\/span> \/var\/www\/html\/index.html<br \/>\nsystemctl <span class=\"token builtin class-name\">enable<\/span> httpd<\/p>\n<p>server2 \u6dfb\u52a0VIP<\/p>\n<p><span class=\"token function\">ip<\/span> a a <span class=\"token number\">192.168<\/span>.48.100\/24 dev eth0<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174205-6a63a3ed89f2d.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> server2 \u5b89\u88c5arptables<\/p>\n<p>yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> arptables<\/p>\n<p>server2 \u6dfb\u52a0arptables\u89c4\u5219<\/p>\n<p>arptables <span class=\"token parameter variable\">-A<\/span> INPUT <span class=\"token parameter variable\">-d<\/span> <span class=\"token number\">192.168<\/span>.48.100 <span class=\"token parameter variable\">-j<\/span> DROP<br \/>\narptables <span class=\"token parameter variable\">-A<\/span> OUTPUT <span class=\"token parameter variable\">-s<\/span> <span class=\"token number\">192.168<\/span>.48.100 <span class=\"token parameter variable\">-j<\/span> mangle &#8211;mangle-ip-s <span class=\"token number\">192.168<\/span>.48.144<\/p>\n<p>server2 \u4fdd\u5b58arptables\u89c4\u5219<\/p>\n<p>arptables-save <span class=\"token operator\">&gt;<\/span> \/etc\/sysconfig\/arptables<\/p>\n<p>server2 \u8bbe\u7f6earptables\u5f00\u673a\u81ea\u542f<\/p>\n<p>systemctl <span class=\"token builtin class-name\">enable<\/span> arptables<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174205-6a63a3eda1fea.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>server3 \u5b89\u88c5\u7f51\u9875\u670d\u52a1<\/p>\n<p>yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> httpd<\/p>\n<p>server3 \u542f\u52a8\u5e76\u5199\u5165\u7f51\u9875\u5185\u5bb9<\/p>\n<p>systemctl <span class=\"token builtin class-name\">enable<\/span> <span class=\"token parameter variable\">&#8211;now<\/span> httpd<br \/>\n<span class=\"token builtin class-name\">echo<\/span> server3 <span class=\"token operator\">&gt;<\/span> \/var\/www\/html\/index.html<\/p>\n<p>server3 \u6dfb\u52a0VIP<\/p>\n<p><span class=\"token function\">ip<\/span> a a <span class=\"token number\">192.168<\/span>.48.100\/24 dev eth0<\/p>\n<p>server3 \u5b89\u88c5arptables<\/p>\n<p>yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> arptables<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174205-6a63a3edc2c75.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174205-6a63a3edca494.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> server3 \u6dfb\u52a0arptables\u89c4\u5219<\/p>\n<p>arptables <span class=\"token parameter variable\">-A<\/span> INPUT <span class=\"token parameter variable\">-d<\/span> <span class=\"token number\">192.168<\/span>.48.100 <span class=\"token parameter variable\">-j<\/span> DROP<br \/>\narptables <span class=\"token parameter variable\">-A<\/span> OUTPUT <span class=\"token parameter variable\">-s<\/span> <span class=\"token number\">192.168<\/span>.48.100 <span class=\"token parameter variable\">-j<\/span> mangle &#8211;mangle-ip-s <span class=\"token number\">192.168<\/span>.48.142<\/p>\n<p>server3 \u4fdd\u5b58arptables\u89c4\u5219<\/p>\n<p>arptables-save <span class=\"token operator\">&gt;<\/span> \/etc\/sysconfig\/arptables<\/p>\n<p>server3 \u8bbe\u7f6earptables\u5f00\u673a\u81ea\u542f<\/p>\n<p>systemctl <span class=\"token builtin class-name\">enable<\/span> arptables<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174205-6a63a3eddc9ad.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>server1\u5b89\u88c5ipvsadm<\/p>\n<p>yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> ipvsadm<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174205-6a63a3edef362.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> server1 \u6dfb\u52a0VIP<\/p>\n<p><span class=\"token function\">ip<\/span> addr <span class=\"token function\">add<\/span> <span class=\"token number\">192.168<\/span>.48.100\/24 dev eth0<\/p>\n<p>server1 \u6dfb\u52a0\u865a\u62df\u670d\u52a1<\/p>\n<p>ipvsadm <span class=\"token parameter variable\">-A<\/span> <span class=\"token parameter variable\">-t<\/span> <span class=\"token number\">192.168<\/span>.48.100:80 <span class=\"token parameter variable\">-s<\/span> rr<\/p>\n<p>server1 \u6dfb\u52a0\u771f\u5b9e\u670d\u52a1\u5668 server2\u3001server3<\/p>\n<p>ipvsadm <span class=\"token parameter variable\">-a<\/span> <span class=\"token parameter variable\">-t<\/span> <span class=\"token number\">192.168<\/span>.48.100:80 <span class=\"token parameter variable\">-r<\/span> <span class=\"token number\">192.168<\/span>.48.144:80 <span class=\"token parameter variable\">-g<\/span><br \/>\nipvsadm <span class=\"token parameter variable\">-a<\/span> <span class=\"token parameter variable\">-t<\/span> <span class=\"token number\">192.168<\/span>.48.100:80 <span class=\"token parameter variable\">-r<\/span> <span class=\"token number\">192.168<\/span>.48.142:80 <span class=\"token parameter variable\">-g<\/span><\/p>\n<p>server1 \u67e5\u770bLVS\u914d\u7f6e<\/p>\n<p>ipvsadm <span class=\"token parameter variable\">-ln<\/span><\/p>\n<p>server1 \u4fdd\u5b58LVS\u914d\u7f6e<\/p>\n<p>ipvsadm-save <span class=\"token operator\">&gt;<\/span> \/etc\/sysconfig\/ipvsadm<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174206-6a63a3ee02e5b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5728server4\u6267\u884c\u547d\u4ee4<\/p>\n<p><span class=\"token keyword\">for<\/span> <span class=\"token for-or-select variable\">i<\/span> <span class=\"token keyword\">in<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">..<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">do<\/span> <span class=\"token function\">curl<\/span> <span class=\"token number\">192.168<\/span>.48.100<span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">done<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174206-6a63a3ee108d5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4e5f\u53ef\u4ee5\u5728 server1 \u4e0a\u67e5\u770b\u8c03\u5ea6\u7edf\u8ba1&#xff1a;<\/p>\n<p>ipvsadm <span class=\"token parameter variable\">-ln<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174206-6a63a3ee1d354.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>\u4e8c\u3001LVS-NAT \u6a21\u5f0f\u642d\u5efa<\/h2>\n<p>\u7ed9server1\u7684\u865a\u62df\u673a\u6dfb\u52a0\u4e00\u5757\u7f51\u5361ens33 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174206-6a63a3ee275cd.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174206-6a63a3ee5c655.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u65b0\u8bbe\u7f6e\u7684\u7f51\u5361\u6240\u5c5e\u7f51\u6bb5&#xff1a;192.168.159.0\/24 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174206-6a63a3ee8face.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5c06server4\u7f51\u7edc\u9002\u914d\u5668\u4fee\u6539\u4e3a\u4ec5\u4e3b\u673a\u6a21\u5f0f <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174207-6a63a3ef0be46.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174207-6a63a3ef42bcc.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4fee\u6539\u4e3adhcp <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174207-6a63a3ef4eb02.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4fdd\u7559192.168.159.0\/24\u7f51\u6bb5&#xff0c;\u4fdd\u8bc1\u6d4b\u8bd5\u673a\u53ea\u80fd\u8bbf\u95ee\u8c03\u5ea6\u5668\u7684\u5916\u90e8\u7f51\u5361 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174207-6a63a3ef5fd34.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174207-6a63a3efde910.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6253\u5f00server1\u8def\u7531\u529f\u80fd<\/p>\n<p><span class=\"token function\">vim<\/span> \/etc\/sysctl.d\/lvs.conf<\/p>\n<p><span class=\"token assign-left variable\">net.ipv4.ip_forward<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span><\/p>\n<p><span class=\"token function\">sysctl<\/span> <span class=\"token parameter variable\">&#8211;system<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174208-6a63a3f020fdb.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174208-6a63a3f03643d.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-25yuvpom4sdhi.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5c06VIP192.168.48.100\/24\u6458\u6389<\/p>\n<p><span class=\"token function\">ip<\/span> addr del <span class=\"token number\">192.168<\/span>.48.100\/24 dev ens32<\/p>\n<p><img decoding=\"async\" src=\"2026-07-25tjlop33xoig.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-25xbujdofustv.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-25yyt1roe2eif.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><img decoding=\"async\" src=\"2026-07-25rwdf5qrjfuz.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4fee\u6539\u7f51\u5173&#xff0c;\u4f7f\u7f51\u5173\u6307\u5411192.168.48.132&#xff0c;\u786e\u4fddRS\u7684\u6570\u636e\u5305\u6b63\u786e\u56de\u5f52\u5230VS\u4e0a<\/p>\n<p>ipvsadm <span class=\"token parameter variable\">-ln<\/span><br \/>\nipvsadm <span class=\"token parameter variable\">-C<\/span><\/p>\n<p>ipvsadm <span class=\"token parameter variable\">-A<\/span> <span class=\"token parameter variable\">-t<\/span> <span class=\"token number\">192.168<\/span>.159.128:80 <span class=\"token parameter variable\">-s<\/span> rr<\/p>\n<p><img decoding=\"async\" src=\"2026-07-25hrwxzjhpyg4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><span class=\"token comment\"># \u6dfb\u52a0\u540e\u7aefRealServer1 server2&#xff0c;-m\u4ee3\u8868NAT\u8f6c\u53d1\u6a21\u5f0f<\/span><br \/>\nipvsadm <span class=\"token parameter variable\">-a<\/span> <span class=\"token parameter variable\">-t<\/span> <span class=\"token number\">192.168<\/span>.159.128:80 <span class=\"token parameter variable\">-r<\/span> <span class=\"token number\">192.168<\/span>.48.144:80 <span class=\"token parameter variable\">-m<\/span><br \/>\n<span class=\"token comment\"># \u6dfb\u52a0\u540e\u7aefRealServer2 server3<\/span><br \/>\nipvsadm <span class=\"token parameter variable\">-a<\/span> <span class=\"token parameter variable\">-t<\/span> <span class=\"token number\">192.168<\/span>.159.128:80 <span class=\"token parameter variable\">-r<\/span> <span class=\"token number\">192.168<\/span>.48.142:80 <span class=\"token parameter variable\">-m<\/span><br \/>\n<span class=\"token comment\"># \u67e5\u770b\u5b8c\u6574\u89c4\u5219\u786e\u8ba4<\/span><br \/>\nipvsadm <span class=\"token parameter variable\">-ln<\/span><\/p>\n<p><img decoding=\"async\" src=\"2026-07-25bwbhbpbi2jk.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5220\u9664\u65e7\u7f51\u5173<\/p>\n<p><span class=\"token function\">ip<\/span> r d default via <span class=\"token number\">192.168<\/span>.48.2<\/p>\n<p>\u6dfb\u52a0\u8c03\u5ea6\u5668 IP \u4f5c\u4e3a\u65b0\u7684\u9ed8\u8ba4\u7f51\u5173&#xff08;LVS-NAT \u6838\u5fc3&#xff09;<\/p>\n<p><span class=\"token function\">ip<\/span> route <span class=\"token function\">add<\/span> default via <span class=\"token number\">192.168<\/span>.48.132 dev ens32<\/p>\n<p>\u6838\u5bf9\u8def\u7531\u662f\u5426\u4fee\u6539\u6210\u529f<\/p>\n<p><span class=\"token function\">ip<\/span> r<\/p>\n<p><img decoding=\"async\" src=\"2026-07-255zmegtiqml4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> server3 \u4e5f\u8981\u7167\u6284\u8fd9\u5957\u64cd\u4f5c<\/p>\n<p><span class=\"token comment\"># \u5220\u9664\u65e7\u7f51\u5173<\/span><br \/>\n<span class=\"token function\">ip<\/span> r d default via <span class=\"token number\">192.168<\/span>.48.2<br \/>\n<span class=\"token comment\"># \u6307\u5411\u8c03\u5ea6\u5668<\/span><br \/>\n<span class=\"token function\">ip<\/span> route <span class=\"token function\">add<\/span> default via <span class=\"token number\">192.168<\/span>.48.132 dev ens32<br \/>\n<span class=\"token comment\"># \u6838\u5bf9<\/span><br \/>\n<span class=\"token function\">ip<\/span> r<\/p>\n<p><img decoding=\"async\" src=\"2026-07-25cqw32rsiykx.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5728server4\u4e0a\u6d4b\u8bd5\u914d\u7f6e <img decoding=\"async\" src=\"2026-07-25udh2o33hlkg.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-25lt0ogjv1zph.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-255ksd2ysufdu.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-25zdmiz2rkhvd.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-25et5tsoqoaxu.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>\u4e09\u3001keepalived\u9ad8\u53ef\u7528<\/h2>\n<p>\u95ee\u9898&#xff1a;<\/p>\n<ul>\n<li>\u67d0\u53f0RealServer down\u4e86&#xff0c;\u600e\u4e48\u529e&#xff1f;<\/li>\n<li>LVS\u672c\u8eabdown\u4e86&#xff0c;\u600e\u4e48\u529e&#xff1f;<\/li>\n<\/ul>\n<p>\u5c06server4\u7f51\u7edc\u9002\u914d\u5668\u8fd8\u539fNAT\u6a21\u5f0f&#xff0c;\u79fb\u9664server1\u7684\u7b2c\u4e8c\u5757\u7f51\u5361&#xff0c;\u56de\u5f52\u539f\u5148DR\u6a21\u5f0f <img decoding=\"async\" src=\"2026-07-25tmdt3ogql42.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-252mpkjcyu2az.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-25h2pe33ayped.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> Q1&#xff1a; <img decoding=\"async\" src=\"2026-07-25btrgvdz12uf.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-25gbgkd14wa2u.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6dfb\u52a0\u5065\u5eb7\u68c0\u6d4b<\/p>\n<p>Q2&#xff1a; \u6a21\u62df\u8c03\u5ea6\u5668\u574f\u6389 <img decoding=\"async\" src=\"2026-07-25yo0elkwkfux.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-254o1smfw0wvo.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u73b0\u5728\u4f7f\u7528server4\u505a\u4e3b\u5907&#xff08;\u4e00\u822c\u4e0d\u63a8\u8350&#xff0c;\u6b64\u5904\u5b9e\u9a8c\u73af\u5883\u673a\u5668\u6709\u9650&#xff09;<\/p>\n<p>\u6574\u4f53\u89c4\u5212<\/p>\n<ul>\n<li>\u4e3b\u8c03\u5ea6\u5668&#xff1a;server1 192.168.48.132<\/li>\n<li>\u5907\u8c03\u5ea6\u5668&#xff1a;server4 192.168.48.143&#xff08;\u539f\u672c\u7684\u5ba2\u6237\u7aef&#xff0c;\u73b0\u5728\u517c\u4efb\u5907 VS&#xff09;<\/li>\n<li>VIP&#xff1a;192.168.48.100<\/li>\n<li>\u540e\u7aef RS&#xff1a;server2 192.168.48.144\u3001server3 192.168.48.142<\/li>\n<li>\u4e24\u53f0 RS \u7684 ARP \u6291\u5236\u3001lo:0 \u7ed1\u5b9a VIP\u3001\u7f51\u5173192.168.48.2\u914d\u7f6e\u4fdd\u6301\u4e0d\u53d8<\/li>\n<\/ul>\n<p>1.\u4e3b server1\u3001\u5907 server4 \u90fd\u5b89\u88c5 Keepalived\u3001 ipvsadm<\/p>\n<p>yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> keepalived ipvsadm<\/p>\n<p>\u6b64\u5904\u5220\u6389server1\u7684VIP&#xff0c;VIP \u5b8c\u5168\u4ea4\u7ed9 Keepalived \u81ea\u52a8\u7ba1\u7406&#xff1a; 1.\u4e24\u53f0\u8c03\u5ea6\u5668&#xff08;server1\u3001server4&#xff09;\u5b89\u88c5 Keepalived&#xff0c;\u6309\u4e4b\u524d\u7ed9\u7684\u914d\u7f6e\u6587\u4ef6\u7f16\u5199eepalived.conf 2.\u542f\u52a8 Keepalived \u540e&#xff0c;\u4e3b\u8282\u70b9\u4f1a\u81ea\u52a8\u628a VIP \u7ed1\u5b9a\u5230 ens32&#xff0c;\u5907\u8282\u70b9\u5e73\u65f6\u4e0d\u751f\u6210 VIP 3.\u4e3b\u8282\u70b9\u6545\u969c\u65f6&#xff0c;\u5907\u8282\u70b9\u81ea\u52a8\u63a5\u7ba1 VIP&#xff0c;\u4e0d\u9700\u8981\u4eba\u5de5\u6267\u884cip addr\u589e\u51cf\u547d\u4ee4 <img decoding=\"async\" src=\"2026-07-25hdkfrpcobqe.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5b89\u88c5\u90ae\u4ef6\u5de5\u5177<\/p>\n<p>yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> mailx<\/p>\n<p>2.\u4e3b\u8282\u70b9 server1 \u914d\u7f6e<\/p>\n<p>\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/p>\n<p><span class=\"token function\">vim<\/span> \/etc\/keepalived\/keepalived.conf<\/p>\n<p><span class=\"token operator\">!<\/span> Configuration File <span class=\"token keyword\">for<\/span> keepalived<\/p>\n<p>global_defs <span class=\"token punctuation\">{<\/span><br \/>\n   notification_email <span class=\"token punctuation\">{<\/span><br \/>\n     root&#064;localhost<br \/>\n   <span class=\"token punctuation\">}<\/span><br \/>\n   notification_email_from keepalived&#064;localhost<br \/>\n   smtp_server <span class=\"token number\">127.0<\/span>.0.1<br \/>\n   smtp_connect_timeout <span class=\"token number\">30<\/span><br \/>\n   router_id LVS_DEVEL<br \/>\n   vrrp_skip_check_adv_addr<br \/>\n   <span class=\"token comment\">#vrrp_strict<\/span><br \/>\n   vrrp_garp_interval <span class=\"token number\">0<\/span><br \/>\n   vrrp_gna_interval <span class=\"token number\">0<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>vrrp_instance VI_1 <span class=\"token punctuation\">{<\/span><br \/>\n    state MASTER<br \/>\n    interface ens32<br \/>\n    virtual_router_id <span class=\"token number\">51<\/span><br \/>\n    priority <span class=\"token number\">100<\/span><br \/>\n    advert_int <span class=\"token number\">1<\/span><br \/>\n    authentication <span class=\"token punctuation\">{<\/span><br \/>\n        auth_type PASS<br \/>\n        auth_pass <span class=\"token number\">1111<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    virtual_ipaddress <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token number\">192.168<\/span>.48.100<br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>virtual_server <span class=\"token number\">192.168<\/span>.48.100 <span class=\"token number\">80<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    delay_loop <span class=\"token number\">3<\/span><br \/>\n    lb_algo rr<br \/>\n    lb_kind DR<br \/>\n    protocol TCP<\/p>\n<p>    real_server <span class=\"token number\">192.168<\/span>.48.144 <span class=\"token number\">80<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        weight <span class=\"token number\">1<\/span><br \/>\n        TCP_CHECK <span class=\"token punctuation\">{<\/span><br \/>\n            connect_timeout <span class=\"token number\">3<\/span><br \/>\n            retry <span class=\"token number\">3<\/span><br \/>\n            delay_before_retry <span class=\"token number\">3<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    real_server <span class=\"token number\">192.168<\/span>.48.142 <span class=\"token number\">80<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        weight <span class=\"token number\">1<\/span><br \/>\n        TCP_CHECK <span class=\"token punctuation\">{<\/span><br \/>\n            connect_timeout <span class=\"token number\">3<\/span><br \/>\n            retry <span class=\"token number\">3<\/span><br \/>\n            delay_before_retry <span class=\"token number\">3<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u542f\u52a8\u670d\u52a1<\/p>\n<p>systemctl start keepalived<\/p>\n<p><img decoding=\"async\" src=\"2026-07-25dy4rv0ygfam.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6267\u884c\u4e0b\u9762\u547d\u4ee4\u6587\u4ef6\u4f1a\u5b8c\u6574\u4f20\u5230\u5907\u673a server4&#xff0c;\u4f46\u590d\u5236\u5b8c\u4e0d\u80fd\u76f4\u63a5\u542f\u52a8&#xff0c;\u8981\u6539\u914d\u7f6e\u3002<\/p>\n<p><span class=\"token function\">scp<\/span> \/etc\/keepalived\/keepalived.conf server4:\/etc\/keepalived\/<\/p>\n<p><img decoding=\"async\" src=\"2026-07-25n0gm2adgnk1.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u4fee\u6539 &#xff1a;state &#043; priority<\/p>\n<p>&#096;&#096;&#096;bash<br \/>\n# \u4e3b\u673a\u662fMASTER\u3001\u4f18\u5148\u7ea7100<br \/>\nstate BACKUP<br \/>\npriority 50<\/p>\n<p>\u5907\u673a\u91cd\u542f\u52a0\u8f7d\u914d\u7f6e<\/p>\n<p>systemctl restart keepalived<\/p>\n<p><img decoding=\"async\" src=\"2026-07-25dah0u5qigao.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u6d4b\u8bd5&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"2026-07-25eptd4tzc1ep.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> Keepalived \u7531 \u6838\u5fc3\u7ec4\u4ef6 \u548c \u914d\u7f6e\u6587\u4ef6 \u4e24\u90e8\u5206\u7ec4\u6210&#xff0c;\u914d\u7f6e\u51b3\u5b9a\u5176\u884c\u4e3a\u903b\u8f91\u3002 \u6838\u5fc3\u7ec4\u4ef6 \u25cf vrrp_instance&#xff1a;VRRP \u5b9e\u4f8b&#xff0c;\u662f Keepalived \u914d\u7f6e\u7684\u6838\u5fc3\u5355\u5143&#xff0c;\u4e00\u4e2a\u5b9e\u4f8b\u5bf9\u5e94\u4e00\u4e2a VIP \u53ca\u4e00\u7ec4\u4e3b\u5907\u8282\u70b9&#xff08;\u5982 VI_1 \u5b9e\u4f8b\u7ba1\u7406 VIP 192.168.36.200&#xff09;\u3002 \u25cf Global_defs&#xff1a;\u5168\u5c40\u914d\u7f6e&#xff0c;\u5b9a\u4e49\u96c6\u7fa4\u6807\u8bc6&#xff08;\u5982 router_id&#xff09;\u3001\u90ae\u4ef6\u901a\u77e5&#xff08;\u6545\u969c\u65f6\u53d1\u544a\u8b66\u90ae\u4ef6&#xff09;\u7b49\u57fa\u7840\u53c2\u6570\u3002 \u25cf Track_script&#xff1a;\u5065\u5eb7\u68c0\u67e5\u811a\u672c&#xff0c;\u7528\u4e8e\u68c0\u6d4b\u4e3b\u8282\u70b9\u4e0a \u201c\u6838\u5fc3\u4e1a\u52a1\u670d\u52a1\u201d&#xff08;\u5982 Nginx\u3001LVS&#xff09;\u662f\u5426\u5b58\u6d3b\u3002\u82e5\u670d\u52a1\u6302\u4e86&#xff0c;\u5373\u4f7f\u4e3b\u8282\u70b9\u672c\u8eab\u5b58\u6d3b&#xff0c;\u4e5f\u4f1a\u4e3b\u52a8\u91ca\u653e VIP&#xff0c;\u89e6\u53d1\u5207\u6362&#xff08;\u907f\u514d \u201c\u4e3b\u8282\u70b9\u5b58\u6d3b\u4f46\u670d\u52a1\u4e0d\u53ef\u7528\u201d \u7684\u95ee\u9898&#xff09;\u3002<\/p>\n<h2>\u56db\u30017\u5c42\u8d1f\u8f7d\u5747\u8861<\/h2>\n<p>\u505c\u6b62 Keepalived&#xff08;server1 \u548c server4&#xff09;<\/p>\n<p>systemctl stop keepalived<\/p>\n<p>server1 \u5b89\u88c5 HAProxy<\/p>\n<p>yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> haproxy<\/p>\n<p>\u521b\u5efa HAProxy \u914d\u7f6e\u6587\u4ef6<\/p>\n<p><span class=\"token function\">vim<\/span> \/etc\/haproxy\/haproxy.cfg<\/p>\n<p>\u6ce8\u91ca\u8fd9\u4e9b\u5185\u5bb9 <img decoding=\"async\" src=\"2026-07-25xqfcxwegdex.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-25sxszyv2tgar.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>frontend  main *:80<br \/>\n    mode http<br \/>\n    default_backend app<\/p>\n<p>backend app<br \/>\n    balance     roundrobin<br \/>\n    server  server2 <span class=\"token number\">192.168<\/span>.48.144:80 check<br \/>\n    server  server3 <span class=\"token number\">192.168<\/span>.48.142:80 check<\/p>\n<p><img decoding=\"async\" src=\"2026-07-25t3ev0rbunzg.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u542f\u52a8 HAProxy<\/p>\n<p>systemctl start haproxy<\/p>\n<p><img decoding=\"async\" src=\"2026-07-25fkkjmk1s0qo.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-25g1zfejvqe45.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-25tk2pc3v4rqu.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2026-07-25erchrakjfk5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> HAProxy\u662f\u5355\u7ebf\u7a0b<\/p>\n<hr \/>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u901a\u8fc7\u672c\u7bc7\u6559\u7a0b\u7684\u5b9e\u8df5&#xff0c;\u6211\u4eec\u7cfb\u7edf\u5730\u5b8c\u6210\u4e86\u4ece\u56db\u5c42\u5230\u4e03\u5c42\u3001\u4ece\u57fa\u7840\u8d1f\u8f7d\u5747\u8861\u5230\u9ad8\u53ef\u7528\u96c6\u7fa4\u7684\u5b8c\u6574\u642d\u5efa\u4e0e\u9a8c\u8bc1\u3002\u8ba9\u6211\u4eec\u56de\u987e\u4e00\u4e0b\u6838\u5fc3\u8981\u70b9\u4e0e\u6536\u83b7&#xff1a;<\/p>\n<p>1. \u6280\u672f\u6808\u6f14\u8fdb\u4e0e\u5bf9\u6bd4<\/p>\n<ul>\n<li>LVS (DR\/NAT \u6a21\u5f0f)&#xff1a;\u4f5c\u4e3a\u56db\u5c42\u8d1f\u8f7d\u5747\u8861\u7684\u6807\u6746&#xff0c;\u5176\u6838\u5fc3\u4f18\u52bf\u5728\u4e8e\u9ad8\u6027\u80fd\u4e0e\u4f4e\u5ef6\u8fdf\u3002DR \u6a21\u5f0f\u901a\u8fc7\u6570\u636e\u94fe\u8def\u5c42\u6539\u5199 MAC \u5730\u5740&#xff0c;\u8ba9 Real Server \u76f4\u63a5\u54cd\u5e94\u5ba2\u6237\u7aef&#xff0c;\u662f\u8ffd\u6c42\u6781\u81f4\u6027\u80fd\u573a\u666f\u7684\u9996\u9009\u3002NAT \u6a21\u5f0f\u5219\u66f4\u7075\u6d3b&#xff0c;\u652f\u6301 Real Server \u4e0e\u5ba2\u6237\u7aef\u5728\u4e0d\u540c\u7f51\u6bb5&#xff0c;\u4f46\u8c03\u5ea6\u5668\u4f1a\u6210\u4e3a\u53cc\u5411\u6d41\u91cf\u7684\u74f6\u9888\u3002<\/li>\n<li>Keepalived&#xff1a;\u89e3\u51b3\u4e86 LVS \u8c03\u5ea6\u5668\u81ea\u8eab\u7684\u5355\u70b9\u6545\u969c\u95ee\u9898\u3002\u5b83\u901a\u8fc7 VRRP \u534f\u8bae\u5b9e\u73b0\u4e3b\u5907\u8282\u70b9\u7684 VIP \u6f02\u79fb\u548c\u5065\u5eb7\u68c0\u67e5&#xff0c;\u5f53\u4e3b\u8282\u70b9\u6545\u969c\u65f6&#xff0c;\u5907\u8282\u70b9\u80fd\u5728\u79d2\u7ea7\u5185\u81ea\u52a8\u63a5\u7ba1&#xff0c;\u4fdd\u969c\u670d\u52a1\u4e0d\u95f4\u65ad&#xff0c;\u662f\u6784\u5efa\u9ad8\u53ef\u7528\u96c6\u7fa4\u7684\u57fa\u77f3\u3002<\/li>\n<li>HAProxy&#xff1a;\u4f5c\u4e3a\u4e03\u5c42\u8d1f\u8f7d\u5747\u8861\u7684\u4ee3\u8868&#xff0c;\u5b83\u63d0\u4f9b\u4e86\u5e94\u7528\u5c42&#xff08;HTTP&#xff09;\u7684\u667a\u80fd\u8def\u7531\u80fd\u529b\u3002\u53ef\u4ee5\u6839\u636e URL\u3001Cookie\u3001Header \u7b49\u4fe1\u606f\u8fdb\u884c\u7cbe\u7ec6\u5316\u7684\u6d41\u91cf\u5206\u53d1&#xff0c;\u9002\u7528\u4e8e\u9700\u8981\u4f1a\u8bdd\u4fdd\u6301\u3001\u52a8\u9759\u5206\u79bb\u3001SSL \u5378\u8f7d\u7b49\u590d\u6742\u7b56\u7565\u7684\u573a\u666f\u3002<\/li>\n<\/ul>\n<p>2. \u5173\u952e\u914d\u7f6e\u4e0e\u539f\u7406<\/p>\n<ul>\n<li>ARP \u6291\u5236&#xff1a;\u5728 LVS-DR \u6a21\u5f0f\u4e2d&#xff0c;\u8fd9\u662f\u907f\u514d\u591a\u53f0 Real Server \u54cd\u5e94 VIP ARP \u8bf7\u6c42\u3001\u5bfc\u81f4 IP \u51b2\u7a81\u7684\u5173\u952e\u914d\u7f6e\u3002<\/li>\n<li>\u7f51\u5173\u6307\u5411&#xff1a;\u5728 LVS-NAT \u6a21\u5f0f\u4e2d&#xff0c;Real Server \u7684\u9ed8\u8ba4\u7f51\u5173\u5fc5\u987b\u6307\u5411\u8c03\u5ea6\u5668\u7684 DIP&#xff0c;\u8fd9\u662f\u5b9e\u73b0\u5730\u5740\u8f6c\u6362\u548c\u56de\u5305\u8def\u7531\u7684\u57fa\u7840\u3002<\/li>\n<li>\u5065\u5eb7\u68c0\u67e5&#xff1a;\u65e0\u8bba\u662f Keepalived \u5bf9 Real Server \u7684 TCP_CHECK&#xff0c;\u8fd8\u662f HAProxy \u540e\u7aef\u7684 check \u53c2\u6570&#xff0c;\u90fd\u5b9e\u73b0\u4e86\u5bf9\u540e\u7aef\u670d\u52a1\u53ef\u7528\u6027\u7684\u81ea\u52a8\u611f\u77e5&#xff0c;\u8fd9\u662f\u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861\u201c\u9ad8\u53ef\u7528\u201d\u800c\u975e\u201c\u9ad8\u6545\u969c\u201d\u7684\u6838\u5fc3\u3002<\/li>\n<\/ul>\n<p>3. \u751f\u4ea7\u73af\u5883\u5efa\u8bae<\/p>\n<ul>\n<li>\u6a21\u5f0f\u9009\u62e9&#xff1a;\u5185\u90e8\u670d\u52a1\u3001\u540c\u673a\u623f\u4e14\u5bf9\u6027\u80fd\u8981\u6c42\u6781\u9ad8&#xff0c;\u4f18\u5148\u9009\u62e9 LVS-DR &#043; Keepalived\u3002\u9700\u8981\u8de8\u7f51\u6bb5\u6216 Real Server \u65e0\u9700\u66b4\u9732\u516c\u7f51 IP \u65f6&#xff0c;\u53ef\u8003\u8651 LVS-NAT\u3002\u5bf9\u4e8e Web \u5e94\u7528&#xff0c;\u9700\u8981\u57fa\u4e8e\u57df\u540d\u3001\u8def\u5f84\u505a\u8def\u7531\u65f6&#xff0c;HAProxy \u6216 Nginx \u662f\u66f4\u5408\u9002\u7684\u9009\u62e9\u3002<\/li>\n<li>\u76d1\u63a7\u4e0e\u544a\u8b66&#xff1a;\u642d\u5efa\u5b8c\u6210\u53ea\u662f\u7b2c\u4e00\u6b65&#xff0c;\u5fc5\u987b\u914d\u5957\u5b8c\u5584\u7684\u76d1\u63a7&#xff08;\u5982\u76d1\u63a7 VIP \u72b6\u6001\u3001\u8fde\u63a5\u6570\u3001\u540e\u7aef\u8282\u70b9\u5065\u5eb7\u72b6\u6001&#xff09;\u548c\u544a\u8b66\u673a\u5236\u3002<\/li>\n<li>\u7070\u5ea6\u4e0e\u6f14\u7ec3&#xff1a;\u4efb\u4f55\u914d\u7f6e\u53d8\u66f4\u90fd\u5e94\u5148\u5728\u6d4b\u8bd5\u73af\u5883\u9a8c\u8bc1\u3002\u5b9a\u671f\u8fdb\u884c\u6545\u969c\u5207\u6362\u6f14\u7ec3&#xff0c;\u786e\u4fdd\u9ad8\u53ef\u7528\u673a\u5236\u5728\u771f\u5b9e\u6545\u969c\u65f6\u80fd\u5982\u671f\u751f\u6548\u3002<\/li>\n<\/ul>\n<p>\u8d1f\u8f7d\u5747\u8861\u4e0e\u9ad8\u53ef\u7528\u662f\u6784\u5efa\u73b0\u4ee3\u5206\u5e03\u5f0f\u7cfb\u7edf\u7684\u5fc5\u5907\u6280\u80fd\u3002\u5e0c\u671b\u672c\u6559\u7a0b\u80fd\u6210\u4e3a\u60a8\u63a2\u7d22\u66f4\u5e7f\u9614\u67b6\u6784\u4e16\u754c\u7684\u4e00\u5757\u575a\u5b9e\u57ab\u811a\u77f3\u3002\u4e0b\u4e00\u6b65&#xff0c;\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u5c06\u8fd9\u5957\u4f53\u7cfb\u4e0e\u5bb9\u5668\u7f16\u6392&#xff08;\u5982 Kubernetes&#xff09;\u3001\u670d\u52a1\u7f51\u683c&#xff08;\u5982 Istio&#xff09;\u7b49\u4e91\u539f\u751f\u6280\u672f\u7ed3\u5408&#xff0c;\u6784\u5efa\u66f4\u5177\u5f39\u6027\u4e0e\u97e7\u6027\u7684\u4e0b\u4e00\u4ee3\u5e94\u7528\u67b6\u6784\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55\u524d\u8a00\u4e00\u3001LVS\u8d1f\u8f7d\u5747\u8861\u4e8c\u3001LVS-NAT \u6a21\u5f0f\u642d\u5efa\u4e09\u3001keepalived\u9ad8\u53ef\u7528\u56db\u30017\u5c42\u8d1f\u8f7d\u5747\u8861\u603b\u7ed3\u524d\u8a00<br \/>\n\u5728\u5f53\u4eca\u9ad8\u5e76\u53d1\u7684\u4e92\u8054\u7f51\u670d\u52a1\u67b6\u6784\u4e2d&#xff0c;\u5355\u53f0\u670d\u52a1\u5668\u5f80\u5f80\u96be\u4ee5\u627f\u53d7\u5de8\u5927\u7684\u8bbf\u95ee\u538b\u529b&#xff0c;\u4e14\u5b58\u5728\u5355\u70b9\u6545\u969c\u7684\u98ce\u9669\u3002\u8d1f\u8f7d\u5747\u8861\u6280\u672f\u5e94\u8fd0\u800c\u751f&#xff0c;\u5b83\u901a\u8fc7\u5c06\u7f51\u7edc\u8bf7\u6c42\u5206\u53d1\u5230\u591a\u53f0\u540e\u7aef\u670d\u52a1\u5668&#xff0c;\u4e0d\u4ec5\u63d0\u5347\u4e86\u7cfb\u7edf\u7684\u6574\u4f53\u5904\u7406\u80fd\u529b&#xff0c;\u4e5f\u589e\u5f3a\u4e86\u670d\u52a1\u7684\u53ef\u7528\u6027\u548c\u53ef\u9760\u6027\u3002<br \/>\nLinux Virtual Server (LVS) \u4f5c\u4e3a\u4e00\u6b3e\u6210\u719f\u3001\u9ad8\u6027\u80fd\u7684\u56db\u5c42&amp;<\/p>\n","protected":false},"author":2,"featured_media":81412,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,258,44],"topic":[],"class_list":["post-81432","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux","tag-258","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Day 7 - \u9ad8\u53ef\u7528\u4e0e\u8d1f\u8f7d\u5747\u8861\uff08\u4e0a\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/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.wsisp.com\/helps\/81432.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Day 7 - \u9ad8\u53ef\u7528\u4e0e\u8d1f\u8f7d\u5747\u8861\uff08\u4e0a\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55\u524d\u8a00\u4e00\u3001LVS\u8d1f\u8f7d\u5747\u8861\u4e8c\u3001LVS-NAT \u6a21\u5f0f\u642d\u5efa\u4e09\u3001keepalived\u9ad8\u53ef\u7528\u56db\u30017\u5c42\u8d1f\u8f7d\u5747\u8861\u603b\u7ed3\u524d\u8a00 \u5728\u5f53\u4eca\u9ad8\u5e76\u53d1\u7684\u4e92\u8054\u7f51\u670d\u52a1\u67b6\u6784\u4e2d&#xff0c;\u5355\u53f0\u670d\u52a1\u5668\u5f80\u5f80\u96be\u4ee5\u627f\u53d7\u5de8\u5927\u7684\u8bbf\u95ee\u538b\u529b&#xff0c;\u4e14\u5b58\u5728\u5355\u70b9\u6545\u969c\u7684\u98ce\u9669\u3002\u8d1f\u8f7d\u5747\u8861\u6280\u672f\u5e94\u8fd0\u800c\u751f&#xff0c;\u5b83\u901a\u8fc7\u5c06\u7f51\u7edc\u8bf7\u6c42\u5206\u53d1\u5230\u591a\u53f0\u540e\u7aef\u670d\u52a1\u5668&#xff0c;\u4e0d\u4ec5\u63d0\u5347\u4e86\u7cfb\u7edf\u7684\u6574\u4f53\u5904\u7406\u80fd\u529b&#xff0c;\u4e5f\u589e\u5f3a\u4e86\u670d\u52a1\u7684\u53ef\u7528\u6027\u548c\u53ef\u9760\u6027\u3002 Linux Virtual Server (LVS) \u4f5c\u4e3a\u4e00\u6b3e\u6210\u719f\u3001\u9ad8\u6027\u80fd\u7684\u56db\u5c42&amp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/81432.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-24T17:42:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174205-6a63a3ed7fd4e.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/81432.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/81432.html\",\"name\":\"Day 7 - \u9ad8\u53ef\u7528\u4e0e\u8d1f\u8f7d\u5747\u8861\uff08\u4e0a\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-24T17:42:09+00:00\",\"dateModified\":\"2026-07-24T17:42:09+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/81432.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/81432.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/81432.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Day 7 - \u9ad8\u53ef\u7528\u4e0e\u8d1f\u8f7d\u5747\u8861\uff08\u4e0a\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Day 7 - \u9ad8\u53ef\u7528\u4e0e\u8d1f\u8f7d\u5747\u8861\uff08\u4e0a\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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.wsisp.com\/helps\/81432.html","og_locale":"zh_CN","og_type":"article","og_title":"Day 7 - \u9ad8\u53ef\u7528\u4e0e\u8d1f\u8f7d\u5747\u8861\uff08\u4e0a\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u76ee\u5f55\u524d\u8a00\u4e00\u3001LVS\u8d1f\u8f7d\u5747\u8861\u4e8c\u3001LVS-NAT \u6a21\u5f0f\u642d\u5efa\u4e09\u3001keepalived\u9ad8\u53ef\u7528\u56db\u30017\u5c42\u8d1f\u8f7d\u5747\u8861\u603b\u7ed3\u524d\u8a00 \u5728\u5f53\u4eca\u9ad8\u5e76\u53d1\u7684\u4e92\u8054\u7f51\u670d\u52a1\u67b6\u6784\u4e2d&#xff0c;\u5355\u53f0\u670d\u52a1\u5668\u5f80\u5f80\u96be\u4ee5\u627f\u53d7\u5de8\u5927\u7684\u8bbf\u95ee\u538b\u529b&#xff0c;\u4e14\u5b58\u5728\u5355\u70b9\u6545\u969c\u7684\u98ce\u9669\u3002\u8d1f\u8f7d\u5747\u8861\u6280\u672f\u5e94\u8fd0\u800c\u751f&#xff0c;\u5b83\u901a\u8fc7\u5c06\u7f51\u7edc\u8bf7\u6c42\u5206\u53d1\u5230\u591a\u53f0\u540e\u7aef\u670d\u52a1\u5668&#xff0c;\u4e0d\u4ec5\u63d0\u5347\u4e86\u7cfb\u7edf\u7684\u6574\u4f53\u5904\u7406\u80fd\u529b&#xff0c;\u4e5f\u589e\u5f3a\u4e86\u670d\u52a1\u7684\u53ef\u7528\u6027\u548c\u53ef\u9760\u6027\u3002 Linux Virtual Server (LVS) \u4f5c\u4e3a\u4e00\u6b3e\u6210\u719f\u3001\u9ad8\u6027\u80fd\u7684\u56db\u5c42&amp;","og_url":"https:\/\/www.wsisp.com\/helps\/81432.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-24T17:42:09+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724174205-6a63a3ed7fd4e.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/81432.html","url":"https:\/\/www.wsisp.com\/helps\/81432.html","name":"Day 7 - \u9ad8\u53ef\u7528\u4e0e\u8d1f\u8f7d\u5747\u8861\uff08\u4e0a\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-24T17:42:09+00:00","dateModified":"2026-07-24T17:42:09+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/81432.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/81432.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/81432.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Day 7 - \u9ad8\u53ef\u7528\u4e0e\u8d1f\u8f7d\u5747\u8861\uff08\u4e0a\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/81432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=81432"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/81432\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/81412"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=81432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=81432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=81432"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=81432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}