Salim
Thu Jul 12 08:50:03 CDT 2007
Thanks for the reply. Problem is my service can run in different user context
depending on the client domain. So when i am running in different user
contexts, ldap connection caching is not working and ADSI is creating new
connections to ldap for every request i guess.
Is there a way to use connection pooling from ldap while running in
different context?
Thanks,
Salim
"Jani Järvinen [MVP]" wrote:
> Hi Salim,
>
> > I am working on a .Net Web Service which will be used by thousands of
> > users
> > at a time. It does lot of file operations (Creating, deleting,
> > enumerating,
> > reading attributes etc) and Ldap queries to AD using .Net APIs. Under
> > stress
> > test, service machine runs out of Sockets.
>
> If you need to support thousands of users (incoming connections) and your
> applications opens many further connections (outgoing) for each incoming
> connection, then you could quite easily run out of sockets especially if the
> connections you make take a second of more to complete. TCP protocol uses a
> 16-bit port number, so you can have no more than about 65500 connections
> open at any given time.
>
> However, that should be plenty for most applications. If you need to support
> thousands of users, then there are three things I can suggest (not in any
> special order):
>
> 1. Conserve the sockets for example with a pool, or, make the use of your
> outgoing sockets sequential instead of firing all queries at once.
>
> 2. Make the outgoing connections faster or eliminate them altogether for
> example with a cache, or by improving performance on the other end-point.
>
> 3. If the above won't work or can't be easily done, then load balance the
> queries into one or more server(s). There are appliances available that can
> show a single IP address to the outside world, but still maintain a farm of
> servers behind it. If you are having thousands of users, I believe the costs
> for an additional server + the said appliance are easily justified. I'd
> estimate they could be in the range of $5,000-$10,000.
>
> Hope this gives food for thought. There's only so much software alone can
> do.
>
> --
> Regards,
>
> Mr. Jani Järvinen
> C# MVP
> Helsinki, Finland
> janij@removethis.dystopia.fi
>
http://www.saunalahti.fi/janij/
>
>
>