Fredhopper does not provide load balancing between query servers. The following document explains how to load balance your Fredhopper environment
|
Status servlet As of FAS6.2.5 Fredhopper recommends using the status servlet for load balancing Fredhopper |
Load balancer requirements
Fredhopper has the following requirements for your load balancers.
- The load balancer can be either hardware or software
- The load balancer should preferably be able to use sticky sessions
- The load balancer should be able to check for different URL's (with different port numbers) and skip a URL if it is not responding
- The load balancer should detect if a previous non-reachable host is back
Qserver ready check
The ready check URL differs through the FAS versions due to the inclusion of new features. Find a table of the URLs below
| Version | URL |
|---|---|
| pre 6.2.5 | http://<host>:x180/fredhopper/up.txt |
| 6.2.5 - 7.0.4 | http://<host>:x180/status/ |
| 7.0.4+ | http://<host>:x183/status/ |
| Please note that the trailing slash in the /status/ URLs is required. |
The URL only returns a successful HTTP return code (200) if the Fredhopper QServer is fully started, i.e. if not only the application is started but also all indexes are loaded. A load balancer checks against this file in order to see if a server should be added to the load balancer or not.
The interval of checking the file determines how quickly the load balancer will recognize down-times, Fredhopper recommends an interval of about 3s.
Status servlet
As of FAS6.2.5 the preferred way to load balance Fredhopper is over the status servlet which is available over http://<server>:<status-port>/status/. The status servlet can be requested in the following ways
| URL | Returns | Not ready | Ready |
|---|---|---|---|
| /status/ | FAS + SEO | HTTP 503 | Startup time of FAS & SEO |
| /status/?fas | FAS | HTTP 503 | Startup time of FAS |
| /status/?seo | SEO | HTTP 503 | Startup time of SEO |
| /status/?ok-response=message | FAS + SEO | HTTP 503 | Message defined by the user in the ok-response param |
The status-port can be calculated as query-port + 3, for example, a qserver listening for queries on port 8180 provides the status servlet on port 8183.
Set up load balancing for Fredhopper
In this example, we assume that we have 1 staging server which indexes the data and 2 live servers that answer requests.
The load balancer should check on both Fredhopper live instances for the status servlet and add the server to the pool if it returns an HTTP return code (200). If a server does not return an HTTP 200 it means it is not able to serve requests and it should be taken out of the pool.
Preferable all requests from the users go over the load balancer and are not sent directly from the front-end itself.
| Checking against a different file than the status servlet might result in Fredhopper not starting properly |
For a detailed example on how to set up load balancing under Linux also see Fail safe HTTP load balancer under Linux
Remove qserver from the load balancer pool
To remove a qserver from the load balancer one has to:
| Version | Action |
|---|---|
| pre 6.2.5 | remove the up.txt file (before 6.2.5.). This file resides in jboss deploy directory. To find it use: 'find j2ee -name up.txt' |
| 6.2.5 - 7.0.4 | remove the file: j2ee/jboss/server/fas/deploy/status.war |
| 7.0.4+ | Request http://<host>:x183/status?stop. This will make the status servlet reply with 503 until you request http://<host>:x183/status?start |
Notes
Customers on version 7.0.4+ and before FAS 7.1 can still use port x180 for requests to the status servlet if they must (not recommended). The frequency of requests to the status servlet should be decreased to about 2 per minute in this case.
Kommentare
0 Kommentare
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.