freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "esterniclos AT gmail.com" <esterniclos AT gmail.com>
- To: freetds AT lists.ibiblio.org
- Subject: [freetds] SQL Cluster always on
- Date: Thu, 07 Jan 2016 10:31:46 +0100
Hello everyone,
We would like to adapt freetds to SQL Server Always On Clustering.
This kind of cluster is pretty simple:
Every database has associated a Listener with a dns name. E.g.
dblistener.myorg.com
Every listener has 2 or more IPs associated:
nslookup dblistener.myorg.com responds something like: 10.57.3.2
and 10.57.4.52
Only one of the IP's serves the database (active-passive)
The connection has to be made directly to the listener. and use
the IP that is working at that moment.
TDS Behaviour at this point.
Right now, TDS works as long as the listener is in the first node.
In the example
dblistener.myorg.com instance working in 10.57.3.2
If the database is moved to another instance, it returns a timeout.
Never checks the rest of IPs
Possible solution
Try to login in several times with as many objects as IP's are
in DNS:
tds/login.c:tds_set_host(TDSLOGIN * tds_login,
const char *hostname)
This would penalize a little when the database is in the
backup instance, as it has to receive a timeout before making the
connection.
To speed up things, the last IP where the database was seen
could be also stored, and only ask dns if there is a time out.
Thank you for your time, and any advice is welcome.
Ester Niclós Ferreras
-
[freetds] SQL Cluster always on,
esterniclos AT gmail.com, 01/07/2016
- Re: [freetds] SQL Cluster always on, James K. Lowden, 01/07/2016
Archive powered by MHonArc 2.6.24.