I just completed an Android application that uses web services to connect to a remote database. I was working on localhost.
Now, I plan to host my web services on a
a) one instance of the web service( example: spring boot micro service) runs/listens in the server machine at port like 80.
b) This webservice(Spring boot app) needs a servlet container like mostly tomcat. This container will have thread pool configured.
c) when ever request come from different users simultaneously, this container will assign each thread from the pool for each of the incoming requests.
d) Since the server side web service code will have beans(in case java) mostly singleton, each thread pertaining to each request will call the singleton API's and if there is a need for Database access , then synchronization of these threads is needed which is done through the @transactional annotation. This annotation synchronizes the database operation.