I want to create a service for online exams that will handle a minimum of 10,000 concurrencies. if i use phoenix as rest api is there any best practice to handle high concurrency ?
Thanks!
I want to create a service for online exams that will handle a minimum of 10,000 concurrencies. if i use phoenix as rest api is there any best practice to handle high concurrency ?
Thanks!
My wild guess is that the database could be the bottleneck. So, instead of writing to DB immediately, maybe we can start a bunch of GenServer
s to accumulate the answers and slowly write them to DB.
I would start with a simple setup and measure it under some synthetic benchmark. 10k connections is not much these days (but might still require modifying ulimits) and modern databases can handle 10k reqs / second on commodity hardware.
So if you plan to run on Linux and use a PostgreSQL database: