Search code examples
ruby-on-railsflynn

How can I run a rails application on multiple vps servers to keep its performance well?


I'm planning to use Flynn to deploy the application and configure the servers, but it seems like Flynn doesn't support scaling out app-severs, db-servers but only supports scaling out web-severs. Even tho I looked for the info about scaling out the rails application, almost no information I got. That's because people believe that Rails applications can't scale out though.

So any idea?


Solution

  • Ruby on Rails apps can't scale is a statement out in market when Twitter moved to scala. But there are other giants using Ruby on Rails like Github, Shopify, etc.

    So my opinion is you need to take architectural design decisions to scale you application and which will vary depending on your usecase.

    There is a great informative Blog: https://rubygarage.org/blog/ruby-on-rails-is-scalable This describes vertical and horizontal scaling with ROR.

    Also about DB scaling, you can decide to use multi-tenancy, multiple-database connections, distributed databases with balancer, etc.

    You can find different gems as per approach that you select. Some examples of gems that you can refer are: multiverse, multi_db, etc.