Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Oh S***: How to bring a big Rails website down (and how not to) by: Tim Morgan
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 this talk titled 'Oh S***: How to bring a big Rails website down (and how not to)', Tim Morgan shares his experiences and lessons learned from working as a senior Rails developer for Scrib, a large Ruby on Rails website with substantial user traffic and data uploads. The session emphasizes the importance of understanding Rails' interaction with databases, particularly in high-traffic scenarios, drawing from personal anecdotes of mistakes that led to significant failures. Key points discussed include: - **Understanding Database Queries**: Tim stresses the necessity of reviewing query logs and using the SQL EXPLAIN tool to analyze how queries behave and their performance impact, especially after adding features. - **Common Scaling Mistakes**: He shares his most severe mistakes, emphasizing that issues often arise when scaling, such as inefficient querying methods and misunderstood ActiveRecord functionalities. - **Composite Primary Keys**: The importance of recognizing how composite primary keys can complicate methods like `find_in_batches`, which can lead to performance problems. - **Validates_uniqueness_of Issues**: Tim recounts a critical incident where he inadvertently caused system downtime due to an implementation mistake in user login validation, highlighting the performance pitfalls of using case insensitive checks in a large user database. - **Differences Between Delete and Destroy**: The confusion between `delete` and `destroy` in Rails, particularly with ActiveRecord associations, led to unintended consequences that affected database integrity. - **Indexing Strategies**: The talk discusses the vital role of efficient indexing in maintaining database performance and how improper indexing can lead to severe slowdowns as applications scale. Tim concludes with the key takeaways for developers working with Rails: - Always understand the implications of the code on the database. - Use tools like EXPLAIN and test against production-like data. - Be proactive in indexing strategies before scaling issues arise. - Learn from failures and treat each as a learning opportunity to improve understanding of database interactions. By sharing these insights, he aims to guide developers on how to prevent similar errors when scaling large applications.
Suggest modifications
Cancel