<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [TOC] ## 負載均衡 ### RR(默認) 1. 每個請求按時間順序逐一分配到不同的后端服務器,如果后端服務器down掉,能自動剔除 2. 可以配置在虛擬站點下, 但是此時只會走8080 或者8081 81端口本身不會成為站點 ``` upstream test { server 127.0.0.1:8080; server 127.0.0.1:8081; } server { listen 81; server_name 127.0.0.1; client_max_body_size 1024M; location / { proxy_pass http://test; proxy_set_header Host $host:$server_port; } } ``` >當訪問calohost:81時,如果localhost:8081 掛了,也不會影響正常訪問 ### 權重 ``` upstream test { server localhost:8080 weight=9; server localhost:8081 weight=1; } ``` >10次一般只會有1次會訪問到8081,而有9次會訪問到8080 ### ip_hash PR 和權重 在有`session` 進行訪問時,由于隨機訪問,導致`session`無效,需要使用`ip_hash` ``` upstream test { ip_hash; server localhost:8080; server localhost:8081; } ``` ### fair(第三方) 按后端服務器的響應時間來分配請求,響應時間短的優先分配。 ``` upstream backend { fair; server localhost:8080; server localhost:8081; } ``` ### url_hash(第三方) 按訪問url的hash結果來分配請求,使每個url定向到同一個后端服務器,后端服務器為緩存時比較有效。 在upstream中加入hash語句,server語句中不能寫入weight等其他的參數,hash_method是使用的hash算法。 ``` upstream backend { hash $request_uri; hash_method crc32; server localhost:8080; server localhost:8081; } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看