Book Image

Heroku Cloud Application Development

By : Anubhav Hanjura
Book Image

Heroku Cloud Application Development

By: Anubhav Hanjura

Overview of this book

Table of Contents (17 chapters)
Heroku Cloud Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Request routing in Heroku


In the current deployment stack, an app named myapp will have the default hostname of myapp.herokuapp.com. The herokuapp.com domain routes any request to Heroku via the routing mesh and provides a direct routing path to the corresponding web processes. This allows for advanced HTTP uses such as chunked responses, long polling, and using an asynchronous web server to handle multiple responses from a single web process.

The routing mesh is responsible for directing a request to the respective dyno in the dyno manifold. The routing mesh uses a round robin algorithm to perform the distribution of requests to the dynos as shown in the following diagram:

The HTTP request follows a timeout (30 sec) for the web process to return its response data to the client. If the web process fails to return the response within this time, the corresponding process log registers an error. After the initial communication, a larger (55 sec) time window is set for client or the server to...