Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



>Flyio does promote a pattern for avoiding the distributed write database complexity

I think the author is talking about the complexity of dealing with read after write situations.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: