in reply to Simultaneous request using threading
** No. The server will serve up to ten requests at any time. But it won't take long to serve login.php, and once it's done with that, a slot is freed, for the next request to come in. You with a browser, or your 10-thread script might be the next to be served.
- wooot!, thanks a lot thats very helpful, just a quick question though. Is there a way in Apache(the server) to limit the number of clients logged-in? I mean, like some sort of a setting that sets the maximum number of active client/active session(not the request itself).
** Threads could work for you, but the first thing to do is drop Thread::Pool like a hot brick. It is just complexity and overhead with no benefit.
- OK, ill try that, I hope it will help me alleviate the memory usage
** I think you should run, do not walk, and check out LWP::Parallel
- nice nice, interesting module, damn how come i missed this module hahaha, thanks!
Just a clarification:
- Basing on my code above, I don't know if the session is still active every time it spawns another thread. I just created a loop of requests hoping it will be active until interrupted, its only a theory, no proof. So im asking a clarification from you guys if what do you think, is it still active? or my code just simply sucks haha.
Now the question, how can I prove that the session is still active? logs? packet sent?
Just incase you're wondering why on earth am I making this script...Its because I was given a task to test the server's capability on handling every client. To check if how the server is responding if there are a number of clients accessing it simultaneously. Example: 20 clients accessing the server, how will the server react, does it still runs on its full potential...
By the way, cookie used, not persistent one. So every time the browser is closed...cookie expired..