Re: HDR and Client Redirection
Posted in 2006
Topics: High Availability & Replication, Server Administration, Networking & sqlhosts Configuration
Obnoxio The Clown wrote:
> Karl Ostner said:
>
>>Joachim,
>>
>>you can do it this way:
>>
>>sqlhosts file:
>>myServer group - -
>>myServer1 onsoctcp myHost1 myPort1 g=myServer
>>myServer2 onsoctcp myHost2 myPort2 g=myServer
>>
>>setup HDR pair using myServer1 and myServer2.
>>
>>for your client, set INFORMIXSERVER=myServer
>
>
> That is documented to work as far as ER is concerned, but TFM does not
> explicitly say that it's OK for application use. I would love this to work
> for everything, can someone confirm whether it's a documentation issue or
> whether it's not supported for application use.
>
It works in all applications with or without ER running. We began to use
this when DBPATH was broken in CSDK 2.60 or so (forget the release) and have
never wanted to go back. It's much more elegant and the DBAs have control
over the failover cascades. With DBPATH you're at the user's mercy:
User: "The primary server crashed and I can still connect to the database
with dbaccess through the backup server. Why isn't my application connecting?"
DBA: "What's the app?"
User: "We just run flugelhorn.exec!"
DBA: "Hmm, flugelhorn.exec works for me!"
User: "Well it doesn't work out of the cron script that starts it up hourly!"
DBA: "<sigh> What's the name of the cron script?"
User: "NotATrumpet.ksh"
DBA: "The NotATrumpet.ksh script sets DBPATH to the old backup server
explicitely after running the environment setup script. That server was
replaced 5 years ago!"
User: "Well that script's been working fine for 7 years! What did you do to
break it now?"
Art S. Kagel
All
We changed the behaviou of connecting via the group as part of the ER/HDR
logic that we put into 9.4 so that it would ensure that the 'primary' server
would be the one that we connected to any time that we connected to the
group. Made the change in both client->server connection logic and in
distributed transactions connection logic.
If you want to use this technique, you might also want to consider setting
INFORMIXCONTIME down low as well so that you don't end up waiting too long
on a primary server that isn't there.
M.P.
"Art S. Kagel" <kagel@bloomberg.net> wrote in message
news:441F2D37.6030902@bloomberg.net...
> Obnoxio The Clown wrote:
> > Karl Ostner said:
> >
> >>Joachim,
> >>
> >>you can do it this way:
> >>
> >>sqlhosts file:
> >>myServer group - -
> >>myServer1 onsoctcp myHost1 myPort1 g=myServer
> >>myServer2 onsoctcp myHost2 myPort2 g=myServer
> >>
> >>setup HDR pair using myServer1 and myServer2.
> >>
> >>for your client, set INFORMIXSERVER=myServer
> >
> >
> > That is documented to work as far as ER is concerned, but TFM does not
> > explicitly say that it's OK for application use. I would love this to
work
> > for everything, can someone confirm whether it's a documentation issue
or
> > whether it's not supported for application use.
> >
>
> It works in all applications with or without ER running. We began to use
> this when DBPATH was broken in CSDK 2.60 or so (forget the release) and
have
> never wanted to go back. It's much more elegant and the DBAs have control
> over the failover cascades. With DBPATH you're at the user's mercy:
>
> User: "The primary server crashed and I can still connect to the database
> with dbaccess through the backup server. Why isn't my application
connecting?"
>
> DBA: "What's the app?"
>
> User: "We just run flugelhorn.exec!"
>
> DBA: "Hmm, flugelhorn.exec works for me!"
>
> User: "Well it doesn't work out of the cron script that starts it up
hourly!"
>
> DBA: "<sigh> What's the name of the cron script?"
>
> User: "NotATrumpet.ksh"
>
> DBA: "The NotATrumpet.ksh script sets DBPATH to the old backup server
> explicitely after running the environment setup script. That server was
> replaced 5 years ago!"
>
> User: "Well that script's been working fine for 7 years! What did you do
to
> break it now?"
>
> Art S. Kagel
This is a documentation issue. It'll take sometime to get this info into documentation. cheers, Keshav.