Friday, March 30, 2012

Mirroring + remoting

Hi,

I have a 3-tier app that is currently running on a simple single server setup. However, I have to adapt it to run on the following setup:

1) Client .NET app on client systems with remoting connection to...

2) Host .NET app with a DAL connecting to ...

3) SQL Server 2005 mirrored

Using mirroring, if the principle SQL server goes down it switches automatically to the mirror server.

My question relates to my connections. What do I need to do to make sure the Client and Host apps follow SQL?

There are two setups I have in mind:

1) Host app + SQL on same box

2) Host app on its own server + SQL on its server (+mirror)

With these scenarios:

Setup 1 - SQL fails but server continues - Host app has to connect to mirror - clients continue to connect to Host on principle server.

Setup 1 - Whole server fails - Host on mirror server connects to mirror SQL and clints now have to locate Host on mirror.

Setup 2 - SQL's server fails so mirror switches in. Only Host app has to re-direct. Clients connect to same Host app.

This is new to me, so if anyone can advise, or direct me to the right info.

Hi,

I assume your solution employs the Presentation Layer <-> Business Layer <-> Data Layer architecture. Since you want to maximise transparency to the client application (pres layer), in my opinion, it's better to go with option 2 and put the host app on a separate server from the database to decrease the probability of multiple failures (if the machine with host + sql goes down - both will be inaccessible).

If you do this and code the host app to use ADO.NET to connect to the database, you could take advantage of the ability of the SqlConnection object to automatically re-connect to the failover partner in a mirrored configuration. This MSDN article explains how this works - http://msdn2.microsoft.com/en-us/library/5h52hef8.aspx.

In addition, if you want complete transparency to the client application, you will still have to make it handle the case where the host fails.

-- Kaloian.

|||

Thanks Kaloian,

That leaves me with the problem of having the clinet apps fail over to another server when the host app's server fails. I guess I'm asking is there a remoting option to fail over, similar to the Failover Partner attribute in the sql connection string? Or am I going to have to trap the failure and code the switch?

|||

As far as I know there's no such mechanism, but you may want to post this question to the .NET Remoting newsgroup - http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=41&SiteID=1

- Kaloian.

No comments:

Post a Comment