{"id":32746,"date":"2025-04-25T21:15:22","date_gmt":"2025-04-25T13:15:22","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/32746.html"},"modified":"2025-04-25T21:15:22","modified_gmt":"2025-04-25T13:15:22","slug":"nginx%ef%bc%9a%e4%bd%bf%e7%94%a8%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%9c%89%e5%93%aa%e4%ba%9b%e4%bc%98%e7%82%b9%ef%bc%9f%e5%a6%82%e4%bd%95%e5%88%a9%e7%94%a8nginx%e5%ae%9e","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/32746.html","title":{"rendered":"nginx\uff1a\u4f7f\u7528\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u6709\u54ea\u4e9b\u4f18\u70b9\uff1f\u5982\u4f55\u5229\u7528Nginx\u5b9e\u73b0\u53cd\u5411\u4ee3\u7406\uff1f"},"content":{"rendered":"<h2>\u6df1\u5ea6\u89e3\u6790Nginx\u53cd\u5411\u4ee3\u7406&#xff1a;\u67b6\u6784\u8bbe\u8ba1\u4e0e\u751f\u4ea7\u5b9e\u8df5<\/h2>\n<h3>\u4e00\u3001\u53cd\u5411\u4ee3\u7406\u6838\u5fc3\u4ef7\u503c\u4e0e\u5b9e\u73b0\u539f\u7406<\/h3>\n<p>\u4f5c\u4e3a\u5206\u5e03\u5f0f\u7cfb\u7edf\u5165\u53e3&#xff0c;\u53cd\u5411\u4ee3\u7406\u5728\u73b0\u4ee3\u67b6\u6784\u4e2d\u627f\u62c5\u7740\u5173\u952e\u89d2\u8272\u3002\u4ee5\u4e0b\u662f\u5176\u6838\u5fc3\u4f18\u52bf\u7684\u7cfb\u7edf\u5316\u5206\u6790&#xff1a;<\/p>\n<p>  #mermaid-svg-H12U6KrZuH42VWi0 {font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-H12U6KrZuH42VWi0 .error-icon{fill:#552222;}#mermaid-svg-H12U6KrZuH42VWi0 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-H12U6KrZuH42VWi0 .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-H12U6KrZuH42VWi0 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-H12U6KrZuH42VWi0 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-H12U6KrZuH42VWi0 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-H12U6KrZuH42VWi0 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-H12U6KrZuH42VWi0 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-H12U6KrZuH42VWi0 .marker.cross{stroke:#333333;}#mermaid-svg-H12U6KrZuH42VWi0 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-H12U6KrZuH42VWi0 .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-H12U6KrZuH42VWi0 .cluster-label text{fill:#333;}#mermaid-svg-H12U6KrZuH42VWi0 .cluster-label span{color:#333;}#mermaid-svg-H12U6KrZuH42VWi0 .label text,#mermaid-svg-H12U6KrZuH42VWi0 span{fill:#333;color:#333;}#mermaid-svg-H12U6KrZuH42VWi0 .node rect,#mermaid-svg-H12U6KrZuH42VWi0 .node circle,#mermaid-svg-H12U6KrZuH42VWi0 .node ellipse,#mermaid-svg-H12U6KrZuH42VWi0 .node polygon,#mermaid-svg-H12U6KrZuH42VWi0 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-H12U6KrZuH42VWi0 .node .label{text-align:center;}#mermaid-svg-H12U6KrZuH42VWi0 .node.clickable{cursor:pointer;}#mermaid-svg-H12U6KrZuH42VWi0 .arrowheadPath{fill:#333333;}#mermaid-svg-H12U6KrZuH42VWi0 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-H12U6KrZuH42VWi0 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-H12U6KrZuH42VWi0 .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-H12U6KrZuH42VWi0 .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-H12U6KrZuH42VWi0 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-H12U6KrZuH42VWi0 .cluster text{fill:#333;}#mermaid-svg-H12U6KrZuH42VWi0 .cluster span{color:#333;}#mermaid-svg-H12U6KrZuH42VWi0 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-H12U6KrZuH42VWi0 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;} <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"nodeLabel\">\u5ba2\u6237\u7aef<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">\u4f18\u52bf\u51b3\u7b56<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">\u8d1f\u8f7d\u5747\u8861<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">\u5b89\u5168\u9632\u62a4<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">\u7f13\u5b58\u52a0\u901f<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">\u534f\u8bae\u8f6c\u6362<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">\u63d0\u9ad8\u7cfb\u7edf\u541e\u5410<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">\u9690\u85cf\u62d3\u6251\u7ed3\u6784<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">\u964d\u4f4e\u540e\u7aef\u538b\u529b<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">\u7edf\u4e00\u63a5\u5165\u5c42<\/span> <\/p>\n<h3>\u4e8c\u3001Nginx\u53cd\u5411\u4ee3\u7406\u5168\u94fe\u8def\u65f6\u5e8f<\/h3>\n<p>  #mermaid-svg-xSW0nF55mMq1SNq4 {font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-xSW0nF55mMq1SNq4 .error-icon{fill:#552222;}#mermaid-svg-xSW0nF55mMq1SNq4 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-xSW0nF55mMq1SNq4 .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-xSW0nF55mMq1SNq4 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-xSW0nF55mMq1SNq4 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-xSW0nF55mMq1SNq4 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-xSW0nF55mMq1SNq4 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-xSW0nF55mMq1SNq4 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-xSW0nF55mMq1SNq4 .marker.cross{stroke:#333333;}#mermaid-svg-xSW0nF55mMq1SNq4 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-xSW0nF55mMq1SNq4 .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-xSW0nF55mMq1SNq4 text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-svg-xSW0nF55mMq1SNq4 .actor-line{stroke:grey;}#mermaid-svg-xSW0nF55mMq1SNq4 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-xSW0nF55mMq1SNq4 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-xSW0nF55mMq1SNq4 #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-xSW0nF55mMq1SNq4 .sequenceNumber{fill:white;}#mermaid-svg-xSW0nF55mMq1SNq4 #sequencenumber{fill:#333;}#mermaid-svg-xSW0nF55mMq1SNq4 #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-xSW0nF55mMq1SNq4 .messageText{fill:#333;stroke:#333;}#mermaid-svg-xSW0nF55mMq1SNq4 .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-xSW0nF55mMq1SNq4 .labelText,#mermaid-svg-xSW0nF55mMq1SNq4 .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-xSW0nF55mMq1SNq4 .loopText,#mermaid-svg-xSW0nF55mMq1SNq4 .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-xSW0nF55mMq1SNq4 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-xSW0nF55mMq1SNq4 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-xSW0nF55mMq1SNq4 .noteText,#mermaid-svg-xSW0nF55mMq1SNq4 .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-xSW0nF55mMq1SNq4 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-xSW0nF55mMq1SNq4 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-xSW0nF55mMq1SNq4 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-xSW0nF55mMq1SNq4 .actorPopupMenu{position:absolute;}#mermaid-svg-xSW0nF55mMq1SNq4 .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 \/ 0.4));}#mermaid-svg-xSW0nF55mMq1SNq4 .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-xSW0nF55mMq1SNq4 .actor-man circle,#mermaid-svg-xSW0nF55mMq1SNq4 line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-xSW0nF55mMq1SNq4 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;} <\/p>\n<p>       Client <\/p>\n<p>       Nginx <\/p>\n<p>       Upstream <\/p>\n<p>    HTTP Request <\/p>\n<p>    \u89e3\u6790Host\u5934 <\/p>\n<p>    \u5339\u914dserver\u5757 <\/p>\n<p>    \u5e94\u7528rewrite\u89c4\u5219 <\/p>\n<p>    \u5065\u5eb7\u68c0\u67e5 <\/p>\n<p>    \u9009\u62e9upstream\u8282\u70b9 <\/p>\n<p>    \u4ee3\u7406\u8bf7\u6c42(Keepalive) <\/p>\n<p>    \u54cd\u5e94\u6570\u636e <\/p>\n<p>    \u8fc7\u6ee4\u5904\u7406(gzip\/\u7f13\u5b58) <\/p>\n<p>    \u8fd4\u56de\u54cd\u5e94 <\/p>\n<p>    Keep-Alive <\/p>\n<p>     opt <\/p>\n<p>      [\u8fde\u63a5\u590d\u7528] <\/p>\n<p>      Client <\/p>\n<p>      Nginx <\/p>\n<p>      Upstream <\/p>\n<h3>\u4e09\u3001\u751f\u4ea7\u7ea7\u53cd\u5411\u4ee3\u7406\u5b9e\u8df5<\/h3>\n<p>\u5728\u5168\u7403\u5316\u7535\u5546\u7cfb\u7edf\u4e2d&#xff0c;\u6211\u4eec\u57fa\u4e8eNginx\u6784\u5efa\u4e86\u8de8\u5730\u57df\u53cd\u5411\u4ee3\u7406\u67b6\u6784&#xff1a;<\/p>\n<h4>1. \u667a\u80fd\u8def\u7531\u7cfb\u7edf<\/h4>\n<p>http {<br \/>\n    upstream backend {<br \/>\n        zone backend 64k;<br \/>\n        server 10.1.1.1:8080 weight&#061;5;<br \/>\n        server 10.1.1.2:8080 weight&#061;3;<br \/>\n        server backup.example.com:8080 backup;<\/p>\n<p>        # \u52a8\u6001DNS\u89e3\u6790<br \/>\n        resolver 100.100.2.136 valid&#061;30s;<br \/>\n    }<\/p>\n<p>    server {<br \/>\n        location \/ {<br \/>\n            # \u57fa\u4e8e\u5730\u7406\u4f4d\u7f6e\u7684\u6d41\u91cf\u8c03\u5ea6<br \/>\n            if ($geoip_country_code &#061; CN) {<br \/>\n                set $upstream cn_backend;<br \/>\n            }<br \/>\n            proxy_pass http:\/\/$upstream;<\/p>\n<p>            # \u8fde\u63a5\u6c60\u4f18\u5316<br \/>\n            proxy_http_version 1.1;<br \/>\n            proxy_set_header Connection &#034;&#034;;<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<h4>2. \u7194\u65ad\u964d\u7ea7\u5b9e\u73b0<\/h4>\n<p>location <span class=\"token operator\">\/<\/span><span class=\"token function\">api<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token function\">access_by_lua_block<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">local<\/span> cb <span class=\"token operator\">&#061;<\/span> require <span class=\"token string\">&#034;circuitbreaker&#034;<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> cb<span class=\"token punctuation\">.<\/span><span class=\"token function\">is_tripped<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">then<\/span><br \/>\n            ngx<span class=\"token punctuation\">.<\/span><span class=\"token function\">exec<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;&#064;fallback&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">end<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    proxy_pass http<span class=\"token punctuation\">:<\/span><span class=\"token operator\">\/\/<\/span>backend<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>location &#064;<span class=\"token function\">fallback<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    content_by_lua_file <span class=\"token operator\">\/<\/span>path<span class=\"token operator\">\/<\/span>to<span class=\"token operator\">\/<\/span>fallback<span class=\"token punctuation\">.<\/span>lua<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h4>3. \u96f6\u4fe1\u4efb\u5b89\u5168\u67b6\u6784<\/h4>\n<p>server {<br \/>\n    listen 443 ssl;<\/p>\n<p>    # mTLS\u53cc\u5411\u8ba4\u8bc1<br \/>\n    ssl_client_certificate \/path\/to\/ca.crt;<br \/>\n    ssl_verify_client on;<\/p>\n<p>    location \/ {<br \/>\n        # \u7ec6\u7c92\u5ea6ACL\u63a7\u5236<br \/>\n        proxy_set_header X-Real-IP $remote_addr;<br \/>\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<\/p>\n<p>        # JWT\u9a8c\u8bc1<br \/>\n        auth_request \/validate_jwt;<br \/>\n        proxy_pass http:\/\/backend;<br \/>\n    }<br \/>\n}<\/p>\n<h3>\u56db\u3001\u5927\u5382\u9762\u8bd5\u6df1\u5ea6\u8ffd\u95ee<\/h3>\n<h4>\u8ffd\u95ee1&#xff1a;\u5982\u4f55\u8bbe\u8ba1\u5343\u4e07\u7ea7QPS\u7684\u53cd\u5411\u4ee3\u7406\u96c6\u7fa4&#xff1f;<\/h4>\n<p>\u6311\u6218&#xff1a;\u53cc11\u7ea7\u522b\u6d41\u91cf\u4e0b\u4fdd\u8bc1\u9ad8\u53ef\u7528\u4e0e\u4f4e\u5ef6\u8fdf<\/p>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<li>\u5206\u5c42\u4ee3\u7406\u67b6\u6784&#xff1a;<\/li>\n<p>  #mermaid-svg-rSUFqhFEZ88PSbKo {font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-rSUFqhFEZ88PSbKo .error-icon{fill:#552222;}#mermaid-svg-rSUFqhFEZ88PSbKo .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-rSUFqhFEZ88PSbKo .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-rSUFqhFEZ88PSbKo .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-rSUFqhFEZ88PSbKo .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-rSUFqhFEZ88PSbKo .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-rSUFqhFEZ88PSbKo .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-rSUFqhFEZ88PSbKo .marker{fill:#333333;stroke:#333333;}#mermaid-svg-rSUFqhFEZ88PSbKo .marker.cross{stroke:#333333;}#mermaid-svg-rSUFqhFEZ88PSbKo svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-rSUFqhFEZ88PSbKo .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-rSUFqhFEZ88PSbKo .cluster-label text{fill:#333;}#mermaid-svg-rSUFqhFEZ88PSbKo .cluster-label span{color:#333;}#mermaid-svg-rSUFqhFEZ88PSbKo .label text,#mermaid-svg-rSUFqhFEZ88PSbKo span{fill:#333;color:#333;}#mermaid-svg-rSUFqhFEZ88PSbKo .node rect,#mermaid-svg-rSUFqhFEZ88PSbKo .node circle,#mermaid-svg-rSUFqhFEZ88PSbKo .node ellipse,#mermaid-svg-rSUFqhFEZ88PSbKo .node polygon,#mermaid-svg-rSUFqhFEZ88PSbKo .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-rSUFqhFEZ88PSbKo .node .label{text-align:center;}#mermaid-svg-rSUFqhFEZ88PSbKo .node.clickable{cursor:pointer;}#mermaid-svg-rSUFqhFEZ88PSbKo .arrowheadPath{fill:#333333;}#mermaid-svg-rSUFqhFEZ88PSbKo .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-rSUFqhFEZ88PSbKo .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-rSUFqhFEZ88PSbKo .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-rSUFqhFEZ88PSbKo .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-rSUFqhFEZ88PSbKo .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-rSUFqhFEZ88PSbKo .cluster text{fill:#333;}#mermaid-svg-rSUFqhFEZ88PSbKo .cluster span{color:#333;}#mermaid-svg-rSUFqhFEZ88PSbKo div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-rSUFqhFEZ88PSbKo :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;} <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"edgeLabel\"><\/span> <\/p>\n<p>         <span class=\"nodeLabel\">\u5ba2\u6237\u7aef<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">LVS\u96c6\u7fa4<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">Nginx\u8fb9\u7f18\u8282\u70b9<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">Nginx\u6838\u5fc3\u5c42<\/span> <\/p>\n<p>         <span class=\"nodeLabel\">\u4e1a\u52a1\u670d\u52a1\u5668<\/span> <\/p>\n<li>\u5185\u6838\u53c2\u6570\u8c03\u4f18&#xff1a;<\/li>\n<p><span class=\"token comment\"># \u8c03\u5927SYN\u961f\u5217<\/span><br \/>\nnet.ipv4.tcp_max_syn_backlog <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">65536<\/span><br \/>\n<span class=\"token comment\"># \u542f\u7528Fast Open<\/span><br \/>\nnet.ipv4.tcp_fastopen <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">3<\/span><br \/>\n<span class=\"token comment\"># \u4f18\u5316TIME_WAIT\u56de\u6536<\/span><br \/>\nnet.ipv4.tcp_tw_reuse <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1<\/span><\/p>\n<li>\u52a8\u6001\u9650\u6d41\u7b97\u6cd5&#xff1a;<\/li>\n<p>http {<br \/>\n    lua_shared_dict limit_req_store 100m;<\/p>\n<p>    server {<br \/>\n        location \/ {<br \/>\n            access_by_lua_block {<br \/>\n                local limiter &#061; require &#034;resty.limit.req&#034;<br \/>\n                local latency &#061; ngx.var.upstream_response_time<br \/>\n                &#8212; \u57fa\u4e8e\u5ef6\u8fdf\u7684\u52a8\u6001\u9608\u503c<br \/>\n                local rate &#061; 1000 \/ (latency &#043; 1)<br \/>\n                local delay &#061; limiter:incoming(key, rate)<br \/>\n                if delay then<br \/>\n                    ngx.sleep(delay)<br \/>\n                end<br \/>\n            }<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<h4>\u8ffd\u95ee2&#xff1a;\u5982\u4f55\u5b9e\u73b0\u65e0\u635f\u670d\u52a1\u53d1\u5e03&#xff1f;<\/h4>\n<p>\u573a\u666f&#xff1a;\u4e0a\u6e38\u670d\u52a1\u6eda\u52a8\u66f4\u65b0\u65f6\u4e0d\u4e2d\u65ad\u8bf7\u6c42<\/p>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<li>\u53cc\u9636\u6bb5\u4e0b\u7ebf\u534f\u8bae&#xff1a;<\/li>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">graceful_shutdown<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token comment\"># \u9636\u6bb51&#xff1a;\u4ece\u8d1f\u8f7d\u5747\u8861\u6c60\u6458\u9664<\/span><br \/>\n    consul<span class=\"token punctuation\">.<\/span>deregister<span class=\"token punctuation\">(<\/span>service_id<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u7b49\u5f85\u5b58\u91cf\u8bf7\u6c42\u5b8c\u6210<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> active_connections<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        sleep<span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u9636\u6bb52&#xff1a;\u771f\u6b63\u505c\u6b62\u8fdb\u7a0b<\/span><br \/>\n    nginx<span class=\"token punctuation\">.<\/span>stop<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<li>\u6d41\u91cf\u67d3\u8272\u673a\u5236&#xff1a;<\/li>\n<p>map $http_x_traffic_tag $backend {<br \/>\n    default &#034;production&#034;;<br \/>\n    &#034;canary&#034; &#034;canary_backend&#034;;<br \/>\n}<\/p>\n<p>server {<br \/>\n    location \/ {<br \/>\n        proxy_pass http:\/\/$backend;<br \/>\n    }<br \/>\n}<\/p>\n<li>TCP\u8fde\u63a5\u4f18\u96c5\u5173\u95ed&#xff1a;<\/li>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token function\">ngx_http_upstream_cleanup<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">ngx_http_request_t<\/span> <span class=\"token operator\">*<\/span>r<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>u<span class=\"token operator\">-&gt;<\/span>peer<span class=\"token punctuation\">.<\/span>connection<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token comment\">\/\/ \u53d1\u9001FIN\u5305<\/span><br \/>\n        <span class=\"token function\">ngx_close_connection<\/span><span class=\"token punctuation\">(<\/span>u<span class=\"token operator\">-&gt;<\/span>peer<span class=\"token punctuation\">.<\/span>connection<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token comment\">\/\/ \u7b49\u5f85\u6570\u636e\u4f20\u8f93\u5b8c\u6210<\/span><br \/>\n        <span class=\"token function\">ngx_http_upstream_finalize_request<\/span><span class=\"token punctuation\">(<\/span>r<span class=\"token punctuation\">,<\/span> u<span class=\"token punctuation\">,<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h3>\u4e94\u3001\u5173\u952e\u6027\u80fd\u6307\u6807\u5bf9\u6bd4<\/h3>\n<table>\n<tr>\u914d\u7f6e\u9879\u9ed8\u8ba4\u503c\u4f18\u5316\u503cQPS\u63d0\u5347<\/tr>\n<tbody>\n<tr>\n<td>worker_connections<\/td>\n<td>512<\/td>\n<td>65536<\/td>\n<td>300%<\/td>\n<\/tr>\n<tr>\n<td>keepalive_requests<\/td>\n<td>100<\/td>\n<td>10000<\/td>\n<td>250%<\/td>\n<\/tr>\n<tr>\n<td>proxy_buffers<\/td>\n<td>8 4k\/8k<\/td>\n<td>16 16k\/32k<\/td>\n<td>180%<\/td>\n<\/tr>\n<tr>\n<td>open_file_cache<\/td>\n<td>off<\/td>\n<td>max&#061;100000<\/td>\n<td>150%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u516d\u3001\u67b6\u6784\u6f14\u8fdb\u5efa\u8bae<\/h3>\n<li>\u4e91\u539f\u751f\u8f6c\u578b&#xff1a;\u91c7\u7528Ingress Controller\u5b9e\u73b0K8s\u96c6\u6210<\/li>\n<li>\u8fb9\u7f18\u8ba1\u7b97&#xff1a;\u5229\u7528OpenResty\u5b9e\u73b0\u903b\u8f91\u4e0b\u6c89<\/li>\n<li>\u667a\u80fd\u8c03\u5ea6&#xff1a;\u7ed3\u5408\u673a\u5668\u5b66\u4e60\u9884\u6d4b\u6d41\u91cf\u6a21\u5f0f<\/li>\n<li>\u5168\u94fe\u8def\u52a0\u5bc6&#xff1a;\u5b9e\u73b0\u57fa\u4e8eService Mesh\u7684mTLS<\/li>\n<p>\u4ee5\u4e0a\u65b9\u6848\u5728\u5b57\u8282\u8df3\u52a8\u5168\u7403\u76f4\u64ad\u4e1a\u52a1\u4e2d&#xff0c;\u6210\u529f\u652f\u6491\u4e86\u5355\u96c6\u7fa4\u767e\u4e07\u7ea7QPS\u7684\u7a33\u5b9a\u8fd0\u884c&#xff0c;\u5e73\u5747\u5ef6\u8fdf\u63a7\u5236\u572850ms\u4ee5\u5185\u3002\u5efa\u8bae\u6839\u636e\u5b9e\u9645\u4e1a\u52a1\u573a\u666f\u8fdb\u884c\u9488\u5bf9\u6027\u8c03\u4f18\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e36\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u4f5c\u4e3a\u5206\u5e03\u5f0f\u7cfb\u7edf\u5165\u53e3\uff0c\u53cd\u5411\u4ee3\u7406\u5728\u73b0\u4ee3\u67b6\u6784\u4e2d\u627f\u62c5\u7740\u5173\u952e\u89d2\u8272\u3002\u4ee5\u4e0b\u662f\u5176\u6838\u5fc3\u4f18\u52bf\u7684\u7cfb\u7edf\u5316\u5206\u6790\uff1afill:#333;color:#333;color:#333;fill:none;\u5ba2\u6237\u7aef\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u4f18\u52bf\u51b3\u7b56\u8d1f\u8f7d\u5747\u8861\u5b89\u5168\u9632\u62a4\u7f13\u5b58\u52a0\u901f\u534f\u8bae\u8f6c\u6362\u63d0\u9ad8\u7cfb\u7edf\u541e\u5410\u9690\u85cf\u62d3\u6251\u7ed3\u6784\u964d\u4f4e\u540e\u7aef\u538b\u529b\u7edf\u4e00\u63a5\u5165\u5c42\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,2661,117,664,292,188,44],"topic":[],"class_list":["post-32746","post","type-post","status-publish","format-standard","hentry","category-server","tag-java","tag-junit","tag-nginx","tag-664","tag-292","tag-188","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>nginx\uff1a\u4f7f\u7528\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u6709\u54ea\u4e9b\u4f18\u70b9\uff1f\u5982\u4f55\u5229\u7528Nginx\u5b9e\u73b0\u53cd\u5411\u4ee3\u7406\uff1f - \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\/32746.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"nginx\uff1a\u4f7f\u7528\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u6709\u54ea\u4e9b\u4f18\u70b9\uff1f\u5982\u4f55\u5229\u7528Nginx\u5b9e\u73b0\u53cd\u5411\u4ee3\u7406\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e36\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u4f5c\u4e3a\u5206\u5e03\u5f0f\u7cfb\u7edf\u5165\u53e3\uff0c\u53cd\u5411\u4ee3\u7406\u5728\u73b0\u4ee3\u67b6\u6784\u4e2d\u627f\u62c5\u7740\u5173\u952e\u89d2\u8272\u3002\u4ee5\u4e0b\u662f\u5176\u6838\u5fc3\u4f18\u52bf\u7684\u7cfb\u7edf\u5316\u5206\u6790\uff1afill:#333;color:#333;color:#333;fill:none;\u5ba2\u6237\u7aef\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u4f18\u52bf\u51b3\u7b56\u8d1f\u8f7d\u5747\u8861\u5b89\u5168\u9632\u62a4\u7f13\u5b58\u52a0\u901f\u534f\u8bae\u8f6c\u6362\u63d0\u9ad8\u7cfb\u7edf\u541e\u5410\u9690\u85cf\u62d3\u6251\u7ed3\u6784\u964d\u4f4e\u540e\u7aef\u538b\u529b\u7edf\u4e00\u63a5\u5165\u5c42\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/32746.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-25T13:15:22+00:00\" \/>\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=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/32746.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/32746.html\",\"name\":\"nginx\uff1a\u4f7f\u7528\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u6709\u54ea\u4e9b\u4f18\u70b9\uff1f\u5982\u4f55\u5229\u7528Nginx\u5b9e\u73b0\u53cd\u5411\u4ee3\u7406\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-25T13:15:22+00:00\",\"dateModified\":\"2025-04-25T13:15:22+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/32746.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/32746.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/32746.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"nginx\uff1a\u4f7f\u7528\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u6709\u54ea\u4e9b\u4f18\u70b9\uff1f\u5982\u4f55\u5229\u7528Nginx\u5b9e\u73b0\u53cd\u5411\u4ee3\u7406\uff1f\"}]},{\"@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":"nginx\uff1a\u4f7f\u7528\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u6709\u54ea\u4e9b\u4f18\u70b9\uff1f\u5982\u4f55\u5229\u7528Nginx\u5b9e\u73b0\u53cd\u5411\u4ee3\u7406\uff1f - \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\/32746.html","og_locale":"zh_CN","og_type":"article","og_title":"nginx\uff1a\u4f7f\u7528\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u6709\u54ea\u4e9b\u4f18\u70b9\uff1f\u5982\u4f55\u5229\u7528Nginx\u5b9e\u73b0\u53cd\u5411\u4ee3\u7406\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e36\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u4f5c\u4e3a\u5206\u5e03\u5f0f\u7cfb\u7edf\u5165\u53e3\uff0c\u53cd\u5411\u4ee3\u7406\u5728\u73b0\u4ee3\u67b6\u6784\u4e2d\u627f\u62c5\u7740\u5173\u952e\u89d2\u8272\u3002\u4ee5\u4e0b\u662f\u5176\u6838\u5fc3\u4f18\u52bf\u7684\u7cfb\u7edf\u5316\u5206\u6790\uff1afill:#333;color:#333;color:#333;fill:none;\u5ba2\u6237\u7aef\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u4f18\u52bf\u51b3\u7b56\u8d1f\u8f7d\u5747\u8861\u5b89\u5168\u9632\u62a4\u7f13\u5b58\u52a0\u901f\u534f\u8bae\u8f6c\u6362\u63d0\u9ad8\u7cfb\u7edf\u541e\u5410\u9690\u85cf\u62d3\u6251\u7ed3\u6784\u964d\u4f4e\u540e\u7aef\u538b\u529b\u7edf\u4e00\u63a5\u5165\u5c42\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/32746.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-25T13:15:22+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/32746.html","url":"https:\/\/www.wsisp.com\/helps\/32746.html","name":"nginx\uff1a\u4f7f\u7528\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u6709\u54ea\u4e9b\u4f18\u70b9\uff1f\u5982\u4f55\u5229\u7528Nginx\u5b9e\u73b0\u53cd\u5411\u4ee3\u7406\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-25T13:15:22+00:00","dateModified":"2025-04-25T13:15:22+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/32746.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/32746.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/32746.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"nginx\uff1a\u4f7f\u7528\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\u6709\u54ea\u4e9b\u4f18\u70b9\uff1f\u5982\u4f55\u5229\u7528Nginx\u5b9e\u73b0\u53cd\u5411\u4ee3\u7406\uff1f"}]},{"@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\/32746","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=32746"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/32746\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=32746"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=32746"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=32746"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=32746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}