CSLA 2.1 Newbie question: Remoting and F5 load balancer

CSLA 2.1 Newbie question: Remoting and F5 load balancer

Old forum URL: forums.lhotka.net/forums/t/3393.aspx


stacy.odell posted on Thursday, August 16, 2007

I'm in the process of rewriting a fairly complex application's middle tier in CSLA 2.1.4 (was originally developed using the MS Web Service Software Factory -- blecch!), and some of what I am reading has me worried.

Our production environment is such that the application middle tier would be running on two IIS servers which are load balanced with an F5 load balancer using sticky sessions, which also has a fairly locked-down firewall in front.

The environment is not subject to change (the servers also happen to be front end web servers for MOSS 2007), and getting firewall ports opened takes an act of God.

My first thought would be remoting data portal in IIS would be the way to go, but I've read about 'issues' getting it to work properly in a load balanced environment, in the event the server you happened to connect to initially goes down and you get balanced over to the other one.

Are there any better solutions?  I really want to give CSLA a go, because I'm very impressed with what it brings to the table, and I for one prefer to code user interfaces against hardened object models instead of web services.

 

JoeFallon1 replied on Thursday, August 16, 2007

Sometimes it helps to draw a diagram. (Can't do that here though.)

One configuration is to have the 2 web servers act as the main UI servers for your app.

So your users all hit those 2 servers.

Now you have 2 choices:

1. Let each server connect to the database using a connection string in your web.config file. In this way you have no issues if one server goes down. Plus you have the fastest possible connection to the DB.

2. Set up a 3rd web server which acts as an Application server. This 3rd server sits between the DB and your 2 web servers so it is already behind the firewall. Now you configure the 2 web servers to use Remoting and contact this third web server which contacts the DB and sends back fully loaded BOs to the 2 web servers. Drawbacks to this configuration include a performance hit due to the Remoting (barely noticeable for small BOs.) Also this App server represents a "single point of failure".

My recommendation is for web servers inside a firewall to use connection strings.

A web server in a DMZ should contact an app server for extra security.

Joe

 

 

 

 

 

 

 

stacy.odell replied on Thursday, August 16, 2007

Hmm...

Perhaps it will help to clarify my application.  It is a Windows Forms client, that is ClickOnce deployed (via the front end web servers) to the user's machine.  That windows app accesses the database via ASP.NET web services, also hosted on the front end web servers.  So essentially you have:

windows client     <----------->    web services    <------------->  sql database

which is physically

client pc               <----------->    load balanced web farm   <------------>  database cluster

A typical n-tier deployment.  I want to replace the web services in the middle with a CSLA data portal, and I'm leaning towards Remoting.

ajj3085 replied on Friday, August 17, 2007

You could replace the web services with a remoting DP.  You'd basically have the business library on both the client computer and the web farm.  Your DataPortal_XYZ methods could then just use standard ado.net (or DAAB, NHibernate, or anything else really).  You'd probably get better performance than using web services, especially if you use Andre's compressed remoting portal. 

If you're doing .Net 3 though, you may want to use WCF, as that is supposed to be the replacement for remoting.  I think you could also encrypt the WCF channel as well providing added security.

stacy.odell replied on Friday, August 17, 2007

ajj3085:
You could replace the web services with a remoting DP.  You'd basically have the business library on both the client computer and the web farm.  Your DataPortal_XYZ methods could then just use standard ado.net (or DAAB, NHibernate, or anything else really).  You'd probably get better performance than using web services, especially if you use Andre's compressed remoting portal. 

If you're doing .Net 3 though, you may want to use WCF, as that is supposed to be the replacement for remoting.  I think you could also encrypt the WCF channel as well providing added security.

I 'get' how data portals work, how to write CSLA objects around them, and how you can partition the application across tiers via simple configuration changes.

I was planning on using a remoting DP all along (although I am unfamiliar with "Andre's compressed remoting portal") -- I was just worried it wouldn't work properly in a load balanced environment, and was hoping for some guidance regarding the best approach regarding data portals and load balancers.

Copyright (c) Marimer LLC