my flask app does the following : user uploads file - file gets processed -->flask returns file
I was curios what does happen if two users simultaneous access the website and perform the same task.
I used selenium server in combination with ray to perform a simultaneous request on the app
code in short form
ray.init()
@ray.remote
def parallel_1():
driver = webdriver.Remote(
command_executor="http://localhost:4444/wd/hub",
desired_capabilities={
"browserName": "chrome",
})
# do task
ret_id1 = parallel_1.remote()
ret_id2 = parallel_1.remote()
ret1, ret2 = ray.get([ret_id1, ret_id2])
the flask view functions are plane simple no threads or sessions, is there something going on under the hood what Im not aware off ? or how does flask handle simultaneous requests ?