Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
ActiveRecord is one of the core modules of Rails. Not-so-well-known features like support for multiple databases added in Rails 6.0 are very easy to set up and customize. Harvest Senior Software Engineer Julia López introduces some of the reasons why having multiple databases makes sense, and how you can extend Rails’ capabilities to match your application needs. Slides available at: https://speakerdeck.com/yukideluxe/using-multiple-databases-with-active-record Links: https://rubyonrails.org/ https://guides.rubyonrails.org/active_record_basics.html https://guides.rubyonrails.org/active_record_multiple_databases.html #RubyonRails #Rails #database #ActiveRecord #multipledatabases
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In the presentation titled 'Using Multiple Databases with Active Record' at Rails World 2023, Senior Software Engineer Julia López from Harvest discusses the benefits and implementation of using multiple databases within Rails applications, particularly focusing on the features introduced in Rails 6.0. López emphasizes that the concept of multiple databases involves having distinct database servers rather than simply multiple schemas in a single database. Key points covered include: - **Introduction to Multiple Databases**: López explains that the main focus is on enabling Active Record to connect with multiple database servers, which was made easier with Rails 6.0. - **High Availability**: The importance of maintaining operational databases to minimize downtime is highlighted, discussing how multiple databases can help manage loads and prevent major failures. - **Data Sharding**: This technique allows for partitioning large databases into smaller, manageable pieces by spreading user data across multiple databases, thus improving performance and scalability. - **Drawbacks of Multiple Databases**: Challenges such as the complexity of migrations and the difficulty of managing transactions and joins between different databases are noted. - **Implementation at Harvest**: López elaborates on how Harvest uses multiple databases, including configuration of Active Record to facilitate writing and reading operations across primary and replica databases. - **Code Examples**: Simplified YAML configuration examples are shared, showcasing how to set up primary and replica database connections and manage manual connection switching. - **Automatic Switching**: This feature allows for automatic redirection of read requests to replica databases, improving load management on the primary database. - **Custom Connection Strategies**: Different applications within Harvest have tailored their database connection strategies based on specific needs, demonstrating flexibility in implementation. The presentation concludes with an invitation for questions, indicating the complexity and evolving nature of database management in Rails applications, while encouraging attendees to share feedback and engage in discussions about best practices.
Suggest modifications
Cancel