Cover by Dan Sanderson

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 3. Handling Web Requests

A web application is an application that responds to requests over the Web. Ideally, a web application is an application that responds to web requests quickly, doing the smallest amount of work required to return a response. Most web apps serve users interacting with the application in real time, and a fast response means less time the user is waiting for an action to be completed or information to be displayed. With user-facing web apps, milliseconds matter.

A less obvious advantage to an app that responds quickly is that it’s easier to scale. The less work the app does in response to a request, the more efficiently those requests can be distributed across multiple servers. It’s like scheduling meetings on a busy day: the shorter the meeting, the more likely you’ll be able to fit it in.

Apps with faster responses are also more tolerant of system faults. An app receiving 100 queries per second of traffic will have fewer simultaneous requests in progress at a given moment in time if each request takes 10 milliseconds than if each request takes 100 milliseconds. If a machine goes down and a portion of the requests in progress must be canceled, fewer users will be affected, and more subsequent new requests will be routed to other machines.

App Engine is designed for web applications that respond to requests quickly. An app that can respond within tens of milliseconds is doing pretty well. Occasionally, an app must take hundreds of milliseconds, such as ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required