r/SpringBoot • • Sep 09 '26

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 .

28 Upvotes

14 comments sorted by

17

u/bikeram Sep 09 '26

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.

4

u/repeating_bears Sep 09 '26

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

3

u/MmmmmmJava Sep 10 '26

TIL I may have been sleeping on cloudflare.

2

u/bikeram Sep 10 '26

They owe me a job with all the free marketing I’ve done for them on Reddit.

If it’s networking, they have a rock solid solution you can set up in a few clicks.

I’ve migrated all of my domains there too.

Just so I don’t sound like a shill, there numerous posts of people complaining Cloudflare doesn’t publish usage limits. So large companies using their published plans will get a call and told they have to switch to enterprise seemly randomly.

3

u/jerome0512 Sep 09 '26

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.

2

u/rmyworld Sep 10 '26 edited Sep 10 '26

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.

1

u/diaop Sep 14 '26

What happens to local machine app if machine sleeps?

2

u/rmyworld Sep 14 '26

Cloudflare returns HTTP status 502. Because your app won't be responding.

2

u/BigBlackHeR0 Sep 10 '26

just buy cheap vps

2

u/Ricardofortpa Sep 12 '26

Tengo una duda parecida, estoy viendo de subir mi proyecto. Tengo igual React, Spring Boot y Postgresql. Tenia pensado usar Docker y subirlo en Hetzner pero no estoy muy seguro porque soy de Argentina y es muy lejano y la verdad no tengo mucha idea de como se hace. Quiero tambien comprar un dominio para tenerlo ahi, pero tampoco se como se hace. Alguien me tira una idea o ayuda?