HTTP Request Cycle

This document shows how a request is processed in EasyEngine in different scenarios.

Let’s assume there are two sites on our server:

  • example-html.com – a HTML site
  • example-wp.com – a WordPress site. This might be a site with or without cache.

Then here’s how the request will be routed internally in EasyEngine depending on site type:

HTML Site

ee4 site diagram-html
  1. User requests for https://example-html.com. The request is received by nginx-proxy on port 443. SSL is terminated here.
  2. nginx-proxy forwards the request to site’s nginx container on port 80.
  3. The site’s nginx gives the response to nginx-proxy.
  4. nginx-proxy forwards the response to the user.

WordPress site without Cache

EasyEngine offers a few customization options when creating site. Following image shows use of global containers.

ee4 site diagram-wp non cached
  1. User requests for https://example-wp.com. The request is received by nginx-proxy on port 443. SSL is terminated here.
  2. nginx-proxy forwards the request to site’s nginx container on port 80.
  3. The site’s nginx then forwards the request to the site’s PHP container.
  4. PHP container process the request, and interacts with database if needed
  5. PHP container returns the response to site’s nginx container
  6. The site’s nginx forwards the response to nginx-proxy.
  7. nginx-proxy forwards the response to user.

WordPress site with Cache

EasyEngine offers a few customization options when creating site. Following image shows use of global containers.

ee4 site diagram-wp with cache
  1. User requests for https://example-wp.com. The request is received by nginx-proxy on port 443. SSL is terminated here.
  2. nginx-proxy forwards the request to site’s nginx container on port 80.
  3. The site’s nginx then forwards the request to the Redis.
  4. If the request is cached, then Redis forwards the cached response to site’s nginx (Skip step 5-8).
  5. If the request is not cached, the site’s nginx forwards the request to PHP.
  6. PHP process request, and interacts with the database if needed.
  7. PHP container returns the response to site’s nginx.
  8. Site’s nginx stores the response in the cache.
  9. The site’s nginx forwards the response to nginx-proxy.
  10. nginx-proxy forwards the response to user.

Subpages