Re: Connection performance issue

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: David Gugick (davidg-nospam_at_imceda.com)
Date: 12/23/04


Date: Thu, 23 Dec 2004 13:54:31 -0500

Zach Wells wrote:
> David Gugick wrote:
>> Zach Wells wrote:
>>
>>> David Gugick wrote:
>>>
>>>>
>>>> If you have CALs, I'm not sure if they are for concurrent or by
>>>> user. But certainly there are considerations, hence, my time out
>>>> suggestion. I've never been on a project that didn't keep them
>>>> open, usually with a timer to drop the connection when idle. It
>>>> would have to be carefully architected, I think into the UI
>>>> itself, rather than the data access library. I think about a
>>>> screen that requires 3 or 4 stored procedure executions to get all
>>>> the data and having to connect and disconnect for each execution
>>>> and the overhead seems high. Disconnecting from the UI would give
>>>> a little more control over when the connection terminates, but
>>>> does leave open the possibility that the connection is never
>>>> closed. And we're back to a timer again...
>>>
>>>
>>> But connection pooling solves that overhead problem doesn't it?
>>>
>>> Zach
>>
>>
>> Yes, connection pooling on the client can mitigate this somewhat. I
>> know you can do this from the ODBC applet in control panel. How else
>> is it implemented?
>>
>
> I'm not terribly familiar with connection pooling. I just know that it
> is on by default.
>
> So, given that, and the way licensing works, it seems to me that
> opening and closing connetions as fast as possible is the way to go.
> Plus, MS recommends that practice. I was really trying to find out
> why you think it makes more sense to keep connections open.
>
> Back in the day (few years ago), it was the practice to open a
> connection when you first started your app, use that connection
> throughout your application's life, then close it when the app exited.
> However, with the newer n-tier architecture it has become the standard
> to open and close your connections as quickly as possible. I'm just
> curious what you use to justify your approach.
>
> FYI, I'm not challenging you or questioning your logic, I'm just
> curious what your logic and arguments are for it.
>
> Zach

I was just talking about a client-server architecture, which is what the
OP was asking, where the front-end is controlling the connections. Once
you move to a middle tier, you can use connection pooling on that
middle-tier computer. I don't think pooling is on by default at the
client (at least not that I've seen on my clients).

For a client-server architecture (like a .Net Windows Forms
application), I would leave the connection open, since you are
guaranteed the best performance. And since I don't know how CALs are
licensed (per user or per connection), I can't speak as to what's the
best for a limited CAL environment, but I would hate to think that a
limited CAL environment ran the risk of running out of connections. Most
companies I know have processor licensing anyway so leaving the
connections open poses no issues and gives best performance. In that
type of environment, I don't see any benefit of opening and closing.

-- 
David G.


Relevant Pages

  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #3]
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... kernel socket family. ... presentation side is left to the client. ... Each connection goes to a particular "service". ...
    (Linux-Kernel)
  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... Make it possible for the client socket to be used to go to more than one ... Each connection goes to a particular "service". ...
    (Linux-Kernel)
  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #2]
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... Make it possible for the client socket to be used to go to more than one ... Each connection goes to a particular "service". ...
    (Linux-Kernel)
  • Re: Remote Client Configuration
    ... the client computer to the SBS domain via connect computer wizard remotely. ... local network or via dial up VPN connection, you will use an local copy on ... connection is established, Group Policy is not applied during logon. ...
    (microsoft.public.windows.server.sbs)
  • RE: RWW not accessible over web
    ... You can install the ISA firewall client on the laptop. ... |> option will configure ISA to provide network security and packet ... Before you run the Configure E-mail and Internet Connection Wizard, ...
    (microsoft.public.windows.server.sbs)