Historically to handle multiple connections in Rails, you had to either patch active record or use a gem. Now, with some new apis on Rails 5.0, we can connect to multiple databases without needing any extra dependencies, and with just a few line of codes. And that will be even easier on Rails 5.1.