Alex
Alex

Reputation: 29

API PHP Script Question

I'm writing a PHP script that will handle requests from outside sources. Does it matter that thousands of requests will be handled by one PHP script? Is this efficient?

Upvotes: 0

Views: 130

Answers (3)

frostymarvelous
frostymarvelous

Reputation: 2805

What you need to know is, an instance of the script is created on each request.

It doesn't matter if you have a single script called 1000 times at once or 1000 scripts called at the same time.

Your bottle neck might be elsewhere like database or file io. So don't worry, you can do as you wish.

Upvotes: 1

JJJ
JJJ

Reputation: 33163

There is no difference if you have two identical scripts on the same server that handle half of the requests each, if that's what you're asking.

Upvotes: 0

genesis
genesis

Reputation: 50976

I do not see reason why this would be problem. If you do not use > 5 queries per API request, it's easy to proccess it all (depends on many factors)

Upvotes: 0

Related Questions