R
Railway15mo ago
Mrxbox98

volume replica

Is there any way to use volumes with replicas?
11 Replies
Percy
Percy15mo ago
Project ID: N/A
Fragly
Fragly15mo ago
Replicas can not use volumes unfortunately
Mrxbox98
Mrxbox98OP15mo ago
Is there any workarounds. We just use it for caching
Fragly
Fragly15mo ago
Not that I know of, the only somewhat kinda almost functional workaround would be tomake an API for uploading and downloading files from a single server with a volume of course this will give problems regarding scalability and of course egress counts against you in terms of price but depending on what specifically you're doing, it could maybe help
Brody
Brody15mo ago
use redis for cache? but yeah you can only attach one volume to one service at a time currently, this will not be the case forever though
Mrxbox98
Mrxbox98OP15mo ago
yeah we will prob use redis or something like that since our volume caching solution is pretty bad anyways Is there a way to make replicas scale based on traffic though?
Brody
Brody15mo ago
there isnt
Mrxbox98
Mrxbox98OP15mo ago
Is there repicas support in the api?
Brody
Brody15mo ago
yes you can change the amount of replicas a given service uses with the api, but I would not recommend it since adding or removing a replica causes a rebuild of the service rebuilding means the service will be redeployed, witch means potential dropped connections during redeployment though I am curious what's stopping you from just setting a conservative value for the replicas and calling it a day?
Mrxbox98
Mrxbox98OP15mo ago
The amount of replicas I need is pretty volatile and I use a external api that ratelimits based on ips. So if I get a bunch of traffic all at once I need multiple IPs to make requests to prevent being ratelimited.
Brody
Brody15mo ago
using replicas for that would not be the best way to overcome those limitations, as there a good chance the replicas are deployed to the same host as the original service maybe look into caching the response from the external api?
Want results from more Discord servers?
Add your server