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
Percy14mo ago
Project ID: N/A
ryanenoch
ryanenoch14mo ago
@Percy N/A
Brody
Brody14mo ago
railway has replicas now, theres no need to do this yourself anymore then again, why do you think you need load balancing??
ryanenoch
ryanenoch14mo ago
Replicas? What's that?
Brody
Brody14mo ago
id be interested in hearing the answer for this before we get into replicas
ryanenoch
ryanenoch14mo 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
Brody14mo 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
ryanenoch14mo 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
Brody14mo 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
ryanenoch14mo ago
Alright thanks again Brody
Brody
Brody14mo 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
ryanenoch13mo ago
Wow. Never thought of that 😅
Brody
Brody13mo 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
ryanenoch13mo ago
Thanks again @Brody I ll look into it
Brody
Brody13mo ago
sounds good