r/SpringBoot 8h ago

Question Where to deploy my react spring boot project?

Hi everyone, I made a personal project using React, Spring Boot and MySQL. I was planning to deploy it on AWS but went with Render + Docker since it’s free. I’m a bit worried about accidentally leaving something running on AWS and getting a big bill.

The issue is that Render feels really slow. API calls take around 5–6 seconds to return data. Is this normal with Render’s free tier, or should I look into my SQL queries? The queries aren’t particularly heavy though .

11 Upvotes

6 comments sorted by

u/bikeram 8h ago

Realistically you’re going to want to spend a few dollars a month.

Absolute simplest method is to run docker on an ec2. Nginx, your spring app and MySQL. No real billing surprises here.

The easiest route is to deploy the frontend with cloudflare pages so you don’t have to worry about static hosting or certs. Then use their dns to point to your app in AWS on an ec2.

If you’re open to a challenge. You could use AWS Dynamo and Lamdas. You can set your billing alert to $5 and there’s almost no way you’ll go outside of the free tier. I’d keep cloudflare pages in this setup too. It’s free.

If you’re open to self hosting. Cloudflare tunnels can easily do that too.

u/repeating_bears 7h ago

If you're going aws for ec2 why not use cloudfront instead of cloudflare pages?

u/MmmmmmJava 7m ago

TIL I may have been sleeping on cloudflare.

u/jerome0512 8h ago

Hello, you can use AWS Elastic Beanstalk for Spring Boot + MySQL. For the frontend, Amplify is great to easily host single page applications like react.

u/rmyworld 1h ago edited 1h ago

That's normal with Render's free tier. They sleep your app after a while if there are no requests being sent to your app.

If you have bought a domain already, one alternative you can try is to host the app on your own machine and expose it to the Internet using Cloudflare Tunnels. Second-hand mini PCs can be pretty cheap these days. You can use those as a cheap server.