I'm new to WCF services and wondered what the best way to tackle the following would be.
I have many clients (~200 - ~500) that are all making requests of my service fairly constantly during the working day. Most requests involve interrogation of an underlying database to feed the correct response back.
What I'm concerned with is the potential number of database connections spawned from the incoming requests. If all clients make simultaneous requests then the database server will be hit hard. I'd like to avoid a silly number of connections to the database if possible.
Would it be better to restrict the number of concurrent connections to the WCF service and hence inadvertently reduce the possible number of database connections?
I've looked at making the service a singleton that spawns threads to do the database transaction so I can control the number of threads but is this overkill and would restricting connections to the service suffice?
Many thanks for any advice.