Skip to Main Content

Application Development Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

apache mod proxy_balancer settings for wcs production

Haythem.ElKhoulyApr 18 2019 — edited Apr 18 2019

Hi Folks,

I hope I can clearly state my issue... In Apache configuration there are two clusters defined for load balancing, and I would like to use sticky session to route user requests always on the first member or always on the second member of the clusters.

Infrastructure 2 X Webservers (apache01 and apache02) - OS Linux - Apache 2.2.34

2 X Oracle Satellite (satellite01 and satellite02) - cache application - OS Solaris

2 X Oracle WCS (wcs01 and wcs02) - cms - OS Solaris

The details about Oracle Satellite and Oracle WCS are not important for the time being. My issue is on Webserver and to be more specific to the Apache and load balancing.

Some environment specifics. - There is no memory/session replication between any Application server - satellite01 will always send the request to wcs01, and satellite02 will always send the request to wcs02 - Apache is checking the request and can send the request * directly to wcs servers, or * apache can send the request to satellite. Satellite may further forward the request to wcs if need it.

user --> Apache --> Satellite --> WCS

OR

user --> Apache --> WCS

Currently in Apache configuration, there are two cluster defined. One for Satellite servers and one for WCS servers. My goal here is all user requests to be served from the same servers. For instance, if the first request goes to wcs01, all further request should be served from wcs01 or satellite01 and vice versa.

My current set up is as follows

<Proxy balancer://CLUSTER_1>
  Order deny,allow
  Allow from all

  Header add Set-Cookie "ROUTEID=%{UNIQUE_ID}e.%{BALANCER_WORKER_ROUTE}e; path=/; HttpOnly; secure" env=BALANCER_ROUTE_CHANGED
  Header add Set-Cookie "WCSID=%{UNIQUE_ID}e.%{BALANCER_WORKER_ROUTE}e; path=/; HttpOnly; secure" env=BALANCER_ROUTE_CHANGED
  ProxySet lbmethod=byrequests stickysession=ROUTEID nofailover=On timeout=5 maxattempts=5 failonstatus=555

  BalancerMember http://wcs01 route=firstNode connectiontimeout=15 retry=1 acquire=3000 keepalive=On
  BalancerMember http://wcs02 route=secondNode connectiontimeout=15 retry=1 acquire=3000 keepalive=On
</Proxy>

<Proxy balancer://CLUSTER_2>
  Order deny,allow
  Allow from all

  Header add Set-Cookie "ROUTEID=%{UNIQUE_ID}e.%{BALANCER_WORKER_ROUTE}e; path=/; HttpOnly; secure " env=BALANCER_ROUTE_CHANGED
  Header add Set-Cookie "SATELLITEID=%{UNIQUE_ID}e.%{BALANCER_WORKER_ROUTE}e; path=/; HttpOnly; secure" env=BALANCER_ROUTE_CHANGED
  ProxySet lbmethod=byrequests stickysession=ROUTEID nofailover=On timeout=5 maxattempts=5 failonstatus=555

  BalancerMember http://satellite01 route=firstNode connectiontimeout=15 retry=1 acquire=3000 keepalive=On
  BalancerMember http://satellite02 route=secondNode connectiontimeout=15 retry=1 acquire=3000 keepalive=On
</Proxy>

<LocationMatch ^/(wcs)(.*)$>
  RequestHeader unset Authorization
  RequestHeader unset Proxy-Authorization
  RequestHeader unset WWW-Authenticate

  ProxyPassMatch balancer://CLUSTER_1/$1$2 nofailover=On
  ProxyPassReverse balancer://CLUSTER_1/$1$2
  ProxyPassReverseCookiePath / /
</LocationMatch>

<LocationMatch ^/(satellite)(.*)$>
  RequestHeader unset Authorization
  RequestHeader unset Proxy-Authorization
  RequestHeader unset WWW-Authenticate

  ProxyPassMatch balancer://CLUSTER_2/$1$2 nofailover=On
  ProxyPassReverse balancer://CLUSTER_2/$1$2
  ProxyPassReverseCookiePath / /
</LocationMatch>

SATELLITEID and WCSID cookies are not in use to my understanding. I have checked applications servers as well. I think I can ignore them for now.

My last update in the above configuration was the "nofailover" to On inside LocationMatch, because I've missed it, but it will take some time to be able to test it. So, my question is, am I missing anything else. Is this set up appropriate to keep the request on the same path?

Comments

bouye-JavaNet

Hi,

passing values from 1 class to another (or 1 part of your program to another) is just a basic Java issue and has little to do with JavaFX itself. You either pass them as parameters of the new class constructor or as parameters when you invoke setters or other methods, your choice. You know how to do that in regular / basic Java (or even in other programming languages)? Then it's exactly the same in JavaFX, no special trick involved...

As for switching scene, if that is needed (because frankly there's little point into switching the entire scene when you just can switch the scene's content), you just have to replace the scene reference in the stage with a new one by calling myStage.setScene(). That's it, there is nothing strange or complex when doing that.

You prefer to no use FXML, OK no worries, it works the same with or without FXML...

So I really do not see what are your issues here... Why not try to do small test programss by yourself to experience that. There is nothing special in the questions you've just asked.

1 - 1

Post Details

Added on Apr 18 2019
0 comments
850 views