Configure Session Persistence

If you created a domain with Oracle WebLogic Server for Oracle Cloud Infrastructure, and your web applications require session persistence, you can update the load balancer for the domain.

Session persistence is a method to direct all requests originating from a single logical client to a single backend server. By default, session persistence is enabled on the load balancer with the Enable load balancer cookie persistence option, but you can update the load balancer after creating a domain.

Oracle Cloud Infrastructure Load Balancing supports two types of session persistence (stickiness):

  • Application cookie persistence - The load balancer activates session persistence when a backend server sends a Set-Cookie response header containing a recognized cookie name.
  • Load balancer cookie persistence - The load balancer inserts a cookie into the response, which enables session persistence. This method is useful when you have applications that cannot generate their own cookies.

To configure session persistence:

  1. Sign in to the Oracle Cloud Infrastructure Console.
  2. From the navigation menu, click Networking, and then click Load Balancers.
  3. Select the Compartment in which the network resources for your domain were created.
    Depending on how the stack is initially created, this is the compartment that contains the compute instances and network resources for the domain, or this is the network compartment that has only the network resources for the domain.
  4. Click the name of the load balancer that's associated with your domain.
    The load balancer has -lb appended to the domain name. For example: abcde1xy-lb
  5. Click Backend Sets.
  6. Click the backend set for this load balancer.
  7. Click Edit.
  8. Modify the Session Persistence configuration.
    For example, if you select Enable Application Cookie Persistence, and set Cookie Name to '*', then responses that contain any cookie will be directed to the same server in the domain.

See these topics in the Oracle Cloud Infrastructure documentation: