RE: RAC 12.2 - singleton service balancing

From: Mark W. Farnham <mwf_at_rsiz.com>
Date: Thu, 11 May 2017 08:17:13 -0400
Message-ID: <02e701d2ca50$86069b20$9213d160$_at_rsiz.com>



When you write “singleton service” are you talking about the Weblogic thing?  

I’m presuming you are.  

I *think* this is a way to automate this:  

  1. Set up Oracle scan listeners with services from the DB context that prefer a single node and a DBA listener with a service named specifically for each instance.
  2. Don’t start the scan listeners immediately when you re-boot. Use the DBA listener as needed if you need to investigate any specific node. Use boring and obvious names.
  3. Figure out how long to wait on a re-boot before you decide that any node that is not up yet is not coming up for normal service.
  4. Now start the scan listeners, so they each actually only advertise a connection to the preferred node (unless that node is actually still down, so you get whatever you have configured for that).

That, coupled with pointing each Weblogic “singleton service” at an Oracle database service should do the trick. If the scan listener is only advertising that service for one node, that is all you get to see.  

On the other hand, you could be talking about something entirely different. You know, like one person talking about life cycle storage management and partitioning and the other person talking about analytic functions and partitioning.  

On the “single node reboots during the day” situation, the listener service will find any secondary nodes if the preferred node goes down, so then if your singleton service that presumably died when the Database instance stopped restarts it will be connected to “not the preferred node.” Maybe that’s what you’re talking about. Now you probably don’t want to stop jobs in progress already running on the non-preferred node when the preferred node start up, but if you have a list of services by preferred node, then you can cause a stop/start of that service when the node (instance) is again available so new connections again hit the preferred node. The blip outage of a service on a stop-start of the service on a listener is usually not a problem, but if it is in your case this solution won’t work for you.  

IF you have to actually wait for all jobs on the non-preferred node for that singleton service to complete (such as some process that was designed to be single threaded), then you’ll need to stop the singleton service and wait for some signal (whether you poll the database for a lock freed or a status updated or use actual signals depends on your technology stack) before you re-start it.  

If the singleton services that have re-located to “not the preferred node” are service daemon type services that stay connected and serially deal with a lot of requests, then you’ll also need to automate stopping and starting the service after the scan listener service to the preferred node has been “blipped.” So the database instance restart finishing triggers stopping and starting the listener service and you wait synchronously on that to stop and re-start a persistent connection singleton service.  

I hope this was somewhat on target for what you wanted.  

mwf  

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Martin Klier - Performing Databases GmbH Sent: Thursday, May 11, 2017 6:13 AM
To: oracle-l_at_freelists.org
Subject: RAC 12.2 - singleton service balancing  

Hi listers,  

we have the need to run 12cR2 database services as singleton services on a RAC (that's a hard fact, please take that as given).  

According to the documentation, a singleton service will not return to its original location, when a node stops/restarts. That means in a 2-node-RAC, that booting a node will concentrate all load on one server, and I have to redistribute them manually again after we have the second node online again.  

In admin managed databases/services I could set a preferred node, and the service would always return to this node, as soon as it is available again. In 12.2 with a policy managed database, I can't have an admin managed service for this DB. I can even understand why, but what I am missing now is an option to rubber-wire a DB service to a node / instance.  

The logic of server pools also prevents me from having a node joining a pool only if the second node is away, at least as far as I came with my tests.  

I appreciate any idea, as long as I don't have to start the same service name on more than one node at the same time.  

Thank you very much in advance!  

--

Martin Klier | Performing Databases GmbH Managing Partner | Senior DB Consultant
Oracle ACE

martin.klier_at_performing-db.com | http://www.performing-databases.com

--

http://www.freelists.org/webpage/oracle-l Received on Thu May 11 2017 - 14:17:13 CEST

Original text of this message