21 Replies
Project ID:
bc72ed00-77ac-4952-811c-d4f8c525ad7b
⚠️ experimental feature
bc72ed00-77ac-4952-811c-d4f8c525ad7b
hello?
Going to need some more info, what questions do you want answered? you’re not going to get any answers without asking a question
Yea sorry just wanted some staff to come before saying the questions
I have a spring boot app which acts as a small casino backend, I was wondering how can I know how many users does it allow to play simultaneously (aka have a thread busy with one api call) with my current billing plan
what billing plan is that? the team is very busy, they won’t respond to questions that don’t directly concern them
such as this one, this is a question I can answer
It is the developer plan
On the dev plan you have a maximum of 8 vCPU which is essentially 8 threads
API calls are usually pretty quick in normal applications, so you really shouldn’t see any bottlenecks unless you have 50+ users using the app at once
Okay, and what if the case is that the api calls trigger some websocket connection with the frontend where basically the backend keeps polling something else that basically always takes 5 minutes to be resolved and once it is resolved it sends the message back to the frontend through the websocket and closes it
I guess that means that the server thread is going to be busy for as long as it takes to do the polling and the reply
Yup, pretty much
So, 8 users using the app at once, hmmm I may want to increase that in the future
You could split the traffic by routing requests through a service that splits them to clones of your backend
sorry just saw this, so u mean like having different 8 CPUs backend instances
No, if you implement multiprocessing in your app then you’ll be able to deal with more users
which yes could mean multiple backends if one is required per request
but for a casino backend I can’t see that happening. What does this backend do? if it just runs games then it really should be able to handle more with the right implementation
the problem is that when a player makes a transaction it could take 10 mins until it gets confirmed, and during that time the thread is polling an api call until the api responds with a 200 which means tx was confirmed
@Adam if I have two environments production and dev does the 8 threads split between both of them?
No, each service gets 8 cores + 8gb ram
Oh alright cool
Lets say railway servers were compromised @Adam , what would be more secure to have passwords in the github code from which railways bootstrap the app, or in the .env values set with railway itself
in your opinion
imo probably the env variables set by Railway
That way they’re not in two locations
if someone were to hijack your github account they wouldn’t necessarily know to check Railway for passwords, but they would check your repos for .env files
Imo that’s the most likely scenario
but this way if they get access to railway they get access to the password dont they?
They’d get access either way
One way they’re only on Railway, the other they’d be on Github and Railway
I wouldn’t worry about Railway’s security
The most likely point of failure is a Github account hijack
yea I think you are right
and even if railway security was compromised, they could see github code
as railway has access to the github repo otherwise they wouldn't be able to bootstrap the project