** 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..
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.