Using a load balancer with the Edge proxy server
-
- UpdatedJan 30, 2025
- 3 minutes to read
- Yokohama
- Edge Encryption
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.
Edge request processing without a load balancer
- The user issues a request from a browser.
- The browser sends the request to the Edge proxy server.
- The proxy server sends the request to the ServiceNow instance.
- The ServiceNow instance returns the response to the proxy server.
- The proxy server adds its own port number in the response header before returning the response to the user's browser.
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.
Edge request processing with a load balancer
- The user issues a request from a browser.
- The browser sends the request to a load balancer Virtual IP (VIP), also known as a Virtual Server.
- The VIP is configured to point to the proxy server (for example, 10.2.200.148:1025), so the load balancer forwards the request to the proxy server.
- The proxy server sends the request to the ServiceNow instance.
- The ServiceNow instance returns the response to the proxy server.
- The proxy server rewrites the location header in the response with values configured
in the properties for risk-servicenow.dev.echonet:1025.
- Host: edgencryption.proxy.host
- HTTP port: edgeencryption.proxy.http.port
- HTTPS port: edgeencryption.proxy.https.port
- The proxy server forwards the response to the load balancer with the location header pointing to the proxy server port.
- 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.
- 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.
Solution
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.
- edgeencryption.proxy.rewrite.location.host specifies the host name used to access ServiceNow through the load balancer.
- edgeencryption.proxy.rewrite.location.https.port specifies the HTTPS port used to access ServiceNow through the load balancer.
Configure the load balancer
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.
Before you begin
- local or domain administrator on a Windows host
- service user with full file system access on a Linux host
Procedure
Result
Requests can be completed because users can now view responses on their browser.