Next.js Discord

Discord Forum

How to Manage Concurrent Users

Answered
Tramp ant posted this in #help-forum
Open in Discord
Tramp antOP
Hi there, today I got a requirement to develop voting application for a organisation with 20k+ members.

The organization is expected to conduct several elections within a year and average polling time will be around 2h

In ideally all the 20k+ members should be able to login to the application and vote in first 1 minute without crashing the application.

In a scenario this kind of higher no of concurrent active users what are the things I should consider in both infrastructure and NextJS application wise.

1. Is using NextJS with app router + server component + server action would be a good choice to handle this kind of higher concurrent user scenario.

2. Also in programming aspect of the application what are the architectural decisions I should make and considet.

3. In infrastructure aspect since the application is no used most the time and when using it active users are going to spike suddenly the operational cost must be lower. Is using vercel pro plan would be a good idea for this.
Answered by B33fb0n3
Is using NextJS with app router + server component + server action would be a good choice to handle this kind of higher concurrent user scenario.
yea, that should be fine.

Also in programming aspect of the application what are the architectural decisions I should make and considet.
you should make sure that the load of the server is on the minimum. So send the client only what the client needs and the other way around as well

In infrastructure aspect since the application is no used most the time and when using it active users are going to spike suddenly the operational cost must be lower. Is using vercel pro plan would be a good idea for this.
using vercel is one option. You might want to enable the "attackers mode", when you expect a spike. Like that all the unlegit traffic will be filtered. I also like to use Cloudflare as they have a "waiting room" feature. Pretty nice feature to not crash your server or make your bill goes 📈
View full answer

3 Replies

Is using NextJS with app router + server component + server action would be a good choice to handle this kind of higher concurrent user scenario.
yea, that should be fine.

Also in programming aspect of the application what are the architectural decisions I should make and considet.
you should make sure that the load of the server is on the minimum. So send the client only what the client needs and the other way around as well

In infrastructure aspect since the application is no used most the time and when using it active users are going to spike suddenly the operational cost must be lower. Is using vercel pro plan would be a good idea for this.
using vercel is one option. You might want to enable the "attackers mode", when you expect a spike. Like that all the unlegit traffic will be filtered. I also like to use Cloudflare as they have a "waiting room" feature. Pretty nice feature to not crash your server or make your bill goes 📈
Answer
happy to help