Book Image

Implementing Cloud Design Patterns for AWS

Book Image

Implementing Cloud Design Patterns for AWS

Overview of this book

Table of Contents (18 chapters)
Implementing Cloud Design Patterns for AWS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Deep health check pattern


Let's consider an example using the two-tier architecture again. So far we have shown how to replicate the UI across single and multiple availability zones, through the multi-server and multi-data center patterns. These patterns used a health check on the server itself to let the load balancer know that the server is operational. The thing that is missing from this is a health check that lets the load balancer know that the database is operational.

The deep health check pattern lets the instances connected to the load balancer, or in this case the UI instances, notify the load balancer of health checks beyond the grasp of the load balancer itself. The example that we will discuss will use a page from the UI instance to return either a 200 OK response or a 500 Internal Server Error if the database is having issues.

The database in this example has no way of letting the load balancer know whether it is in a healthy state. The way we will get to this information is to...