I spun up a cloud server and put my flask web app code plus a frontend in there. When a user runs an operation on the frontend this gets sent to the backend endpoint as a JSON, then processed and another JSON gets sent back to the frontend. I want to say that I am new to this and seeking advice to best handle situations like 100+ simultaneous users.
I can imagine one user making a call to the flask endpoint, that gets processed and sent back to the frontend - but what if 100+ users are hitting this same endpoint? Would it be a first come first serve situation, like a queue? But what about the possibility of two people hitting the endpoint at the exact same time? I am using Gunicorn instead of the default flask server (via flask run).
I am new to these concepts, but I am wondering how these might apply (if at all ) to my situation and if so how I'd go about integrating them into my code/infrastructure:
- Queuing
- Caching
- Asychronous
- Multi-processing
- Multi-threading
- Concurrency
- Parallelism
- Distributed systems
If anyone could please add clarity it would be greatly appreciated. If there are any monitoring tools I could attach to this application that would also be great.
Thank you
/computeZillionsPiDecimal?numberOfZillions=, then, indeed, if your server accept only one connection at a time, some client would get a timeout). But that would be bad practice. If your route doesn't take way less that 1 second to execute, then you should have some sort of background server-side works in place. I won't expand on that subject, since I have no reason to think that you are in this case.