DEV Community

Bhagat Surya
Bhagat Surya

Posted on

Should I use server-side rendering with Next.js, or would Express or Bun.js be better for scalability?

I'm currently developing a web app and have a question about architecture and scaling. Typically, the frontend and backend are separated and run in an auto-scaling environment like AWS Elastic Beanstalk, where costs are incurred only when the system is in use. I understand that frontend assets are often stored in an object storage service like S3 to effectively manage scaling. However, in Next.js 14, where the frontend and backend are integrated, I'm concerned about the impact on efficiency and cost. Specifically, if the backend isn't in use but the frontend is, the integrated system still consumes resources because it must spin up both. Does this setup affect the efficiency and pricing compared to a configuration where the frontend and backend are separate?

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay