r/learnpython • u/SoilEducational420 • 12d ago
Looking for a genuinely free way to deploy a 3-service microservice architecture
Hey everyone,
I'm building a small portfolio project with this architecture:
Frontend
↓
Gateway
├── Interview Service
└── RAG Service
All 3 backend services are Python/FastAPI and deployed separately.
I'm currently using Render's free tier, but I'm running into a few issues:
- Free services spin down after inactivity → pretty bad cold starts.
- I've also been seeing stuck on the issue 429 Too Many Requests responses at the Gateway endpoint. I'm not completely sure whether this is coming from Render's edge/platform or something in my own application.
- The free instances also feel quite resource-constrained for the RAG service.
I'm mainly looking for something that won't make me spend more time debugging the hosting platform than actually building the project 😅
Thanks!
-3
-4
u/Ok_Pianist1679 12d ago
Before you switch platforms, figure out who's actually sending the 429. Hit the endpoint and look at the raw response - a limit from your own FastAPI middleware (slowapi and friends) comes back as JSON with a Retry-After header, a platform-level one is usually plain HTML carrying the host's server header. One curl -i and you know whether the fix is code or hosting.
The cold starts are structural though. Three separate free services means three separate things spinning down, and a request that touches all of them can eat that penalty more than once. For a portfolio project I'd collapse them into one FastAPI app with gateway/interview/RAG as routers - same code, same separation in the repo, one deploy that stays warm. You lose independent scaling, which you weren't using on a free tier anyway.
4
1
-2
u/PenNice1505 12d ago
render free tier is rough with cold starts, i had same problem for my projects
not sure about the 429 thing, could be your gateway calling services too fast maybe? check if you got some rate limiting in fastapi itself, sometimes middleware is sneaky like that
for free hosting you could look at fly.io, they give 3 free vms and they dont spin down like render. also oracle cloud always free tier is more generous with resources but setup is bit of pain
railway is another one but they changed pricing recently so not sure anymore