Hi,
I have a Rails app running in multiple regions, with the primary region being lhr. This is the current setup:
app 5 shared 1 1024 MB iad,lhr(3),syd
solidq 5 shared 1 1024 MB iad,lhr(3),syd
In the primary region, it is super fast. In all other regions though, it is very slow. I think this is DB related, so I also scaled my Fly Postgres machines as so:
NAME COUNT KIND CPUS MEMORY REGIONS
5 shared 1 1024 MB iad,lhr(3),syd
I have also installed the ‘fly-ruby’ gem, which is supposed to handle replica regions and route traffic accordingly.
From using a VPN I can see that the request is going to the correct place, but that ActiveRecord is taking ages to load:
syd [info][31d82c8c-fefb-4fb4-97bb-99fc32769b5f] Completed 200 OK in 35145ms (Views: 319.6ms | ActiveRecord: 35320.4ms (86 queries, 28 cached) | GC: 41.7ms)
Am I missing something? Any help with this would be appreciated.