0

I have two apps running on three separate Liberty Profile servers (each). The first app renders the UI and second apps serves data via REST webservices. The UI application has a login page that on successful landing takes the user to the home page. Homepage shows some data received as a response from the other REST app on the same server

I have configured a Load balancer infront of those 3 servers. I am able to login successfully and land on the homepage. But the page is not populated with the responses from the REST service.

Following is the default.conf entry i have added in nginx plus.

upstream mycluster {
    ip_hash;
    server 162.194.243.182:9080;
    server 162.194.243.183:9080;
    server 162.194.243.184:9080;

}

location / {
        proxy_pass http://mycluster;
    }

I am not sure what is the configuration I miss from the point of Loadbalancer. Could someone help me here?

Thank you.

krckumar
  • 544
  • 4
  • 21
  • You'll really need to debug in terms of HTTP requests and responses, not pages being "populated" – covener May 25 '17 at 13:10
  • covener - thanks for your response. I was wondering if i miss anything w.r.t the nginx conf. I will debug the request and responses. – krckumar May 25 '17 at 14:21

1 Answers1

2

You should be using JSESSIONID affinity:

upstream my_cluster {
  server 162.194.243.182:9080;
  server 162.194.243.183:9080;
  server 162.194.243.184:9080;

  sticky learn
        create=$upstream_cookie_JSESSIONID
        lookup=$cookie_JSESSIONID
        zone=client_sessions:1m;
}
covener
  • 17,402
  • 2
  • 31
  • 45