cancel
Showing results for 
Search instead for 
Did you mean: 
Jacob_Barton
Content Contributor
Content Contributor

In this article, we discuss the changes necessary for a successful integration of the API Server within a load balanced environment. These changes are straight forward but vital when attempting to make REST API calls through a load balanced environment.

Additional Handling

 With a load balancer, there is an additional cookie that must be included with every request. Unlike the OnBase session cookie (Cookie.Session.OnBase.Hyland) which is only updated for new session calls to OnBase, the load balancer cookie (FB_LB) is updated after every request. Therefore, every request to the API Server, there is a new load balancer cookie generated.  Each generated cookie from the response header must be added to the next request. Below, figure 1 and 2 are the correct sample request and response, respectively.

 

a4175371f7fc4f2faa5c857ca5df1c74

Figure 1: A correct Sample request

 

Figure 1 shows a correct request sent to the API Server during the OnBase Upload process. Please note the two different cookies being used in the header. From top to bottom, one for the load balancer, and one for the API Server Session. These cookies become important when uploading documents as the document upload id is needed for the API Server to keep track of the upload information. In a load balanced environment, the load balancer does not know which API Server to send the information to without the load balancer cookie. This error will be covered a bit further at the bottom of this section.

 

ea30acc7c2bd4b3f9f652cd5bf346f1b

Figure 2: A correct sample response header

 

When configured correctly, the response header will include two Set-Cookie commands; one for each cookie required in the next request header.  When looking closer, it is noted that while the session cookie has remained the same, the load balancer cookie has changed.

 

**NOTE: Not having this cookie handled correctly during document archival can result in a 404 error during the byte upload portion of the process. As mentioned above, the information to the upload is held inside the single API Server. If a new API Server receives this call, it will not allow for the upload to occur since it would not have seen the upload id present inside the request URL.

 

43eb962af395448094098970fd83e07f

Figure 3: Sample Upload ID Error

 

Figure 3 shows a sample error received when the Load balancer cookie is not handled properly in the document upload process.

Added configuration

The load balancer requires configuration for sticky sessions for it to know which API Server created the OnBase Core Session and to handle all other requests. For Cloud hosted customers, any load balancing performed within the hosted solution will be configured by the Hyland Global Cloud Services team.

Conclusion

Adding a load balancer to your API Server integrated solution has multiple benefits, but one must be careful not to forget the added steps needed to make sure their solutions work when added into the environment.

 

**NOTE: The information in this article is based on the configuration within the Hyland Cloud environment. The load balancer configuration is controlled by the Hyland Cloud team and the details of its configuration are not available. This configuration works with the Hyland Cloud environments and may not necessarily be appropriate in all situations. For information about specific Hyland Cloud configurations please contact your first line technical support team.

8 Comments