Next.js Discord

Discord Forum

Any downsides of fetching all data through server actions instead of doing it client side?

Unanswered
Transvaal lion posted this in #help-forum
Open in Discord
Transvaal lionOP
I'm in the process of building an ecommerce website which will get a ton of traffic. To leverage RSC as much as possible even when I need to step into "use client" land I still do all fetches through the server with server actions. I expect hundreds of people will be searching through products, filtering, sorting etc at the same time, so I wonder if the server will become a bottleneck, and whether it would be a good idea to move fetching to the client side to distribute the load to all users browsers instead of handling it all on the server.

One huge gain of doing it on the server is of course caching and hiding the api url. But is it asking too much from the server and next.js cache in the case of a high traffic ecommerce website, or is this where RSC will shine the most? 🙂

0 Replies