<h2>Configure the load balancer</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2025" /><meta name="DC.rights.owner" content="(C) Copyright 2025" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="reference" /><meta name="DC.title" content="Using a load balancer with the Edge proxy server" /><meta name="abstract" content="You can use a load balancer to balance the load across the proxy servers in your Edge Encryption proxy setup. If the load balancer and proxy servers are using different ports, specify the host name and HTTPS port of the load balancer to enable users to view responses on their browser." /><meta name="description" content="You can use a load balancer to balance the load across the proxy servers in your Edge Encryption proxy setup. If the load balancer and proxy servers are using different ports, specify the host name and HTTPS port of the load balancer to enable users to view responses on their browser." /><meta name="DC.relation" scheme="URI" content="../../../administer/edge-encryption/concept/c_InstallEdgeEncryptionProxy.html" /><meta name="DC.relation" scheme="URI" content="../../../administer/general/concept/platsec-landing.html" /><meta name="DC.relation" scheme="URI" content="../../../administer/encryption/concept/encryption.html" /><meta name="DC.relation" scheme="URI" content="../../../administer/edge-encryption/reference/edge-encryption.html" /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2023-08-03" /><meta name="DC.date.modified" content="2024-02-01" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="load-balancer-edge-proxy" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>Using a load balancer with the Edge proxy server</title></head><body> <div class="nested0" id="load-balancer-edge-proxy"> <h1 class="title topictitle1" id="ariaid-title1">Using a load balancer with the Edge proxy server</h1> <div class="body refbody"><p class="shortdesc"><span class="ph">You can use a load balancer to balance the load across the proxy servers in your Edge Encryption proxy setup.</span> <span class="ph">If the load balancer and proxy servers are using different ports, specify the host name and HTTPS port of the load balancer to enable users to view responses on their browser.</span></p> <div class="section" id="load-balancer-edge-proxy__section_x24_mhj_h2b"> <div class="p"><div class="note important"><span class="importanttitle">Important:</span> All production environments should include at least two Edge Encryption proxy servers for redundancy.</div> </div> </div> <div class="section" id="load-balancer-edge-proxy__without-load-balancer"><h2 class="title sectiontitle">Edge request processing without a load balancer</h2> <div class="p">If you are not using a load balancer, a request is processed as described below.<ol class="ol" id="load-balancer-edge-proxy__ol_n4j_wtz_12b"><li class="li">The user issues a request from a browser.</li><li class="li">The browser sends the request to the Edge proxy server.</li><li class="li">The proxy server sends the request to the ServiceNow instance.</li><li class="li">The ServiceNow instance returns the response to the proxy server.</li><li class="li">The proxy server adds its own port number in the response header before returning the response to the user's browser.</li></ol> </div> <p class="p">The request is completed successfully because the user can view the response from the proxy server at the port number specified in the response header.</p> </div> <div class="section" id="load-balancer-edge-proxy__with-load-balancer"><h2 class="title sectiontitle">Edge request processing with a load balancer</h2> <div class="p">However, if you are using a load balancer, the user's browser communicates directly with the load balancer, not with the proxy server. A request is processed as described below.<div class="note"><span class="notetitle">Note:</span> The following example uses <span class="ph filepath">1025</span> as the proxy server port number.</div> <ol class="ol" id="load-balancer-edge-proxy__ol_hyj_kjf_b2b"><li class="li">The user issues a request from a browser.</li><li class="li">The browser sends the request to a load balancer Virtual IP (VIP), also known as a Virtual Server.</li><li class="li">The VIP is configured to point to the proxy server (for example, <span class="ph filepath">10.2.200.148:1025</span>), so the load balancer forwards the request to the proxy server.</li><li class="li">The proxy server sends the request to the ServiceNow instance.</li><li class="li">The ServiceNow instance returns the response to the proxy server.</li><li class="li">The proxy server rewrites the location header in the response with values configured in the properties for <span class="ph filepath">risk-servicenow.dev.echonet:1025</span>.<ul class="ul" id="load-balancer-edge-proxy__ul_ndd_sw1_c2b"><li class="li"><span class="ph uicontrol">Host</span>: <span class="ph filepath">edgencryption.proxy.host</span></li><li class="li"><span class="ph uicontrol">HTTP port</span>: <span class="ph filepath">edgeencryption.proxy.http.port</span></li><li class="li"><span class="ph uicontrol">HTTPS port</span>: <span class="ph filepath">edgeencryption.proxy.https.port</span></li></ul> </li><li class="li">The proxy server forwards the response to the load balancer with the location header pointing to the proxy server port.</li></ol> </div> <div class="p">The outcome depends on whether the load balancer and proxy servers are using the same port.<ul class="ul" id="load-balancer-edge-proxy__ul_vll_lkf_b2b"><li class="li">If the load balancer and proxy servers are using the same port, the request succeeds because the user receives the response from the same port identified in the response header.</li><li class="li">If the load balancer and proxy servers are using different ports, the request fails because the user's browser communicates only with the load balancer, but the response is on the proxy server.</li></ul> </div> </div> <div class="section" id="load-balancer-edge-proxy__section_jmx_mvz_12b"><h2 class="title sectiontitle">Solution</h2> <p class="p">You could resolve the issue by simply using the load balancer and all Edge proxy servers on the same port, but this is not an ideal solution. A better solution is to enable the system to know which port the load balancer uses.</p> <div class="p">The following properties enable the Edge proxy server to reroute response messages to the load balancer if the proxy server and load balancer are using different ports.<ul class="ul" id="load-balancer-edge-proxy__ul_y2t_fpd_h2b"><li class="li"><span class="keyword parmname">edgeencryption.proxy.rewrite.location.host</span> specifies the host name used to access ServiceNow through the load balancer.</li><li class="li"><span class="keyword parmname">edgeencryption.proxy.rewrite.location.https.port</span> specifies the HTTPS port used to access ServiceNow through the load balancer.</li></ul> </div> </div> </div> <div class="related-links"> <div class="familylinks"> <div class="parentlink"><strong>Parent Topic:</strong> <a class="link" href="../../../administer/edge-encryption/concept/c_InstallEdgeEncryptionProxy.html" title="You can install an Edge Encryption proxy manually or using the Edge Encryption interactive installer.">Installing Edge Encryption</a></div> </div> </div><div class="topic task nested1" id="configure-load-balancer"> <h2 class="title topictitle2" id="ariaid-title2">Configure the load balancer</h2> <div class="body taskbody"><p class="shortdesc"><span class="ph">If the load balancer and proxy servers are using different ports, specify the host name and HTTPS port of the load balancer to enable users to view responses on their browser.</span></p> <div class="section prereq p">Roles required:<ul class="ul" id="configure-load-balancer__ul_tyl_p1p_xdb"><li class="li">local or domain administrator on a Windows host</li><li class="li">service user with full file system access on a Linux host</li></ul> </div> <ol class="ol steps"><li class="li step stepexpand"> <span class="ph cmd">Login to the proxy server host as admin, domain admin, or a service user.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Navigate to the installation directory for the Edge proxy and select <span class="ph filepath">conf/edgeencryption.properties</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Set the following properties:</span> <div class="itemgroup info"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="configure-load-balancer__table_ezb_gdx_c2b" class="table" frame="border" border="1" rules="all"><colgroup><col style="width:50%" /><col style="width:50%" /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d307429e321">Property</th><th class="entry cellrowborder" style="vertical-align:top;" id="d307429e324">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d307429e321 ">edgeencryption.proxy.rewrite.location.host</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d307429e324 ">If your Edge configuration includes a load balancer to balance the load among proxy servers, rewrites responses to the load balancer so requests can be completed.<ul class="ul" id="configure-load-balancer__ul_cs2_px1_c2b"><li class="li">If there is a load balancer in the proxy setup, specify the host name used to access ServiceNow through the load balancer.</li><li class="li">Optional: If there is no load balancer in the proxy setup, you can set this value to the host name used by the proxy server.</li></ul> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d307429e321 ">edgeencryption.proxy.rewrite.location.https.port</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d307429e324 ">If your Edge configuration includes a load balancer to balance the load among proxy servers, specifies the HTTPS port used to access ServiceNow through the load balancer.<ul class="ul" id="configure-load-balancer__ul_o4m_5x1_c2b"><li class="li">If there is a load balancer in the configuration, specify the HTTPS port used to access ServiceNow through the load balancer.</li><li class="li">Optional: If there is no load balancer in the configuration, you can set this value to the HTTPS port used by the proxy server.</li></ul> </td></tr></tbody></table> </div> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Save the file.</span> </li></ol> <div class="section result" id="configure-load-balancer__result_wpn_lsk_h2b"> <p class="p">Requests can be completed because users can now view responses on their browser.</p> </div> </div> </div> </div> </body></html></div>