Reputation: 3875
I have a page on which a cURL
is performed and takes a few seconds to complete.
I was wondering what would happen at the server if few users accessed that page at the same time.
My guess is that each user will be given his/hers own time (say 5 seconds), but it should not affect each others waiting time, or should it ?
Thanks
Upvotes: 0
Views: 313
Reputation: 437376
Impossible to say because there are too many unknown factors¹, most notably the number of users hitting you within any one 5 sec interval. But for a sanely small number of users it should be fine.
¹ For example: how many requests can/will your setup serve concurrently? what about the remote curl
target?
Upvotes: 0
Reputation: 151594
It all depends on resources.
If the processing of your requests takes five seconds because of heavy file I/O, simultaneous requests might slow down the other ones, doubling the time required for each requests.
Same goes for bandwidth: is it a lot of data you're requesting? Then multiple simultaneous requests might impact each other, given a maximum bandwidth the upstream server can assign to a single connection and its total bandwidth.
Furthermore, when the processing of the (result of the) request takes up a (relative) lot of processor time, firing multiple request at one can slow down each request.
Upvotes: 1
Reputation: 48101
Yes of course. Because it's multithreaded. Requests don't interfer between each other (if they are not too many)
Upvotes: 1