R
Railway•2y ago
ryanenoch

nginx server for flask on Railway???

Hi. I wanted to add a nginx server for load balancing for my python flask template app on Railway. https://github.com/ryanenoch/flask I tried looking for answers on YouTube but most of the tutorials used the local Windows or Ubuntu Linux environment. Can anyone point me in the right direction? Thanks in advance
GitHub
GitHub - ryanenoch/flask: Flask template for Railway deployment
Flask template for Railway deployment. Contribute to ryanenoch/flask development by creating an account on GitHub.
15 Replies
Percy
Percy•2y ago
Project ID: N/A
ryanenoch
ryanenochOP•2y ago
@Percy N/A
Brody
Brody•2y ago
railway has replicas now, theres no need to do this yourself anymore then again, why do you think you need load balancing??
ryanenoch
ryanenochOP•2y ago
Replicas? What's that?
Brody
Brody•2y ago
id be interested in hearing the answer for this before we get into replicas
ryanenoch
ryanenochOP•2y ago
I actually wanted to make sure that my other web apps can handle the heavy traffic in the future that's why I was looking into load balancing
Brody
Brody•2y ago
fair 1. write efficient code 2. read the docs for railways replica functionality https://docs.railway.app/develop/services#horizontal-scaling-with-replicas
ryanenoch
ryanenochOP•2y ago
Thanks Brody Just one more question (pls forgive me for my noobieness😅) What is the max traffic limit for a web app using replicas? Is it dependent on our Railway subscription plan?
Brody
Brody•2y ago
you can set a max of 20 replicas, but your code is the determining factor on how much web traffic it can handle
ryanenoch
ryanenochOP•2y ago
Alright thanks again Brody
Brody
Brody•2y ago
and keep in mind, lets say your app uses a stable 1$ a month without any replicas, and you add 20 replicas, that will cost you 20$, since 1$ x 20 = 20$
ryanenoch
ryanenochOP•2y ago
Wow. Never thought of that 😅
Brody
Brody•2y ago
yeah but ideally if you have enough incoming traffic to warrant 20 replicas you have setup a way to generate revenue, so that you can afford a seat on the teams plan and your resource costs
ryanenoch
ryanenochOP•2y ago
Thanks again @Brody I ll look into it
Brody
Brody•2y ago
sounds good
Want results from more Discord servers?
Add your server