Get an improved navigation experience with a Chrominium based browser.
Dismiss
Ruby Video
Talks
Speakers
Events
Leaderboard
Sign in
Talks
Speakers
Events
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
How does a web request make it through a Rails app? And, what happens when a lot of them are coming in, all at once? If you've ever been curious about how requests are handled, or about how to analyze and configure your infrastructure for optimally managing throughput, then this talk is for you! In this session, you'll learn about the makeup of an individual web request, how Rails environments can best be setup to handle many requests at once, and how to keep your visitors happy along the way. We'll start by following a single request to its response, and scale all the way up through navigating high traffic scenarios.
Date
Summary
Markdown supported
In this talk titled 'From Request To Response And Everything In Between,' Kevin Lesht explores the lifecycle of a web request in a Rails application and how to optimize web app environments for handling multiple requests simultaneously. The session focuses on the technical aspects of processing requests efficiently, particularly in the context of high traffic scenarios. Key points include: - **Single Request Processing:** Understanding how Rails processes a single request at a time and the implications of request queuing when additional requests come in while another is still being processed. - **Scaling Requests:** The speaker parallels request handling to managing people at a conference registration, illustrating the importance of having multiple volunteers (or processes) to handle incoming requests efficiently. - **Multi-Process Handling:** Introduces the web application server Puma, discussing how it allows for multiple processes to run simultaneously, thus increasing throughput. - **Request Arrival Rate:** Emphasizes the importance of calculating the optimal number of processes needed based on incoming request rates and processing times, illustrating with practical examples of attendee processing times at a conference. - **Impact of Variability:** Discusses how traffic patterns can change and the need to adjust the number of processes accordingly, introducing a buffer factor for enhanced reliability. - **Multi-threaded Processes:** Covers multi-threading, explaining how Puma can handle multiple requests concurrently; it also discusses the limitations of Ruby’s Global VM Lock. - **Database Considerations:** Highlights the importance of managing database connections to support active requests, ensuring threads can access required data simultaneously. In conclusion, Lesht emphasizes that understanding these factors is crucial for developing a scalable Rails application that can handle varying traffic loads efficiently. The talk urges attendees to continuously assess their infrastructure and adjust settings as necessary to maintain optimal performance in real-world scenarios.
Suggest modifications
Cancel