What does HackerNews think of fly-ruby?

Ruby gem for handling requests within a Fly.io multiregion database setup

Language: Ruby

Yes, it's Ruby on Rails! I'm using Hotwired on the frontend, which has been great for making discussions real-time while minimizing complexity. I'm hosting on Fly.io - I had used Render for a prior product (https://postcard.page), and found Render slow. Fly lets me set up multiple data centers, and they have an elegant little Ruby gem [1] to enable multi-region support on Rails without much fuss.

[1] https://github.com/superfly/fly-ruby

Flyio does promote a pattern for avoiding the distributed write database complexity: request replay, a single main write database, and replicated read dbs.\1

When a request comes in to write on a read server that attempt a db write, the request is aborted and replayed on the main write server.

With some clever assumptions such as “get requests rarely write to the db” and “post request usually do”, much of the write traffic can skip the read vms.

They created a ruby rack middleware\2 to standardize this pattern for Ruby on Rails.

\1 https://fly.io/blog/run-ordinary-rails-apps-globally/

2\ https://github.com/superfly/fly-ruby

Fly is compelling enough to use without all the global deployment options they offer[1] but it's assuring to know if you ever do need to deploy globally, they can support that better than most.

[1] - https://github.com/superfly/fly-ruby