does python function work if multiple user call it at same instant
<p>I am using django framework. I have built one web application using python and django. 
I am not using any classes or oops concept in my application. I am just using python's function.
for e.g. </p>

<pre><code>def addnum(request):
    a=request.GET.get('a')
    b=request.GET.get('b')
    res=a+b
    return HttpResponse(json.dumps(res), content_type="application/json")
</code></pre>

<p>Now this kind of functions i am calling from client side using ajax and getting back my result</p>

<p>My question is .. if multiple users are accessing the application at same instant.. so this 'addnum' function will get call at same instant ...
Then how will it work.
will it get break for some of user and incorrect output ?
will it decrease performance and increase response time?
will it work parallely and everything will work fine?</p>

<p>Please help me to get out of this problem/confusion!</p>

<p>It does not depend upon how you are writing your code it depends upon the server that how it handles multiple requests. I think that a free server on <a href="http://pythonanywhere.com" rel="nofollow">pythonanywhere</a> would be able to handle about 1K concurrent user requests. A server and user is connected using unique identification of ports which allows multiple connections on the server with different users. In simple language we can say that for every user requests server create instances that processes these requests.</p>

javascript python django python-2.7 django-views