Deployment Speed Issues with NestJS + Supabase
I'm experiencing significant performance problems with my deployed NestJS backend connected to Supabase.
Setup:
Backend: NestJS deployed on Railway free tier (Amsterdam)
Database: Supabase (Frankfurt)
Issue: Extremely slow database interactions on deployed version vs local
Performance Comparison example (600KB file upload):
Local (to same remote Supabase):
Validation: 7ms
File upload: 703ms
Database update (users.file_created_at): 53ms
Railway Deployment:
Validation: 500ms
File upload: 3+ seconds
Database update: ~2 seconds
The validation slowdown makes sense due to weaker server hardware that's expected. But every Supabase interaction being 4-6x slower seems excessive.
Also tried switching to Render (Frankfurt) to match Supabase region but experienced the same issue.
I just wonder if it's strictly a problem with hosting (free tier) environments that throttle network performance?
Setup:
Backend: NestJS deployed on Railway free tier (Amsterdam)
Database: Supabase (Frankfurt)
Issue: Extremely slow database interactions on deployed version vs local
Performance Comparison example (600KB file upload):
Local (to same remote Supabase):
Validation: 7ms
File upload: 703ms
Database update (users.file_created_at): 53ms
Railway Deployment:
Validation: 500ms
File upload: 3+ seconds
Database update: ~2 seconds
The validation slowdown makes sense due to weaker server hardware that's expected. But every Supabase interaction being 4-6x slower seems excessive.
Also tried switching to Render (Frankfurt) to match Supabase region but experienced the same issue.
I just wonder if it's strictly a problem with hosting (free tier) environments that throttle network performance?