Three-tier web app template

This guide helps you understand the Three-tier web app application template, which helps you quickly deploy a three-tier web application stack to Google Cloud.

The three-tier web app includes the following:

  • Optional load balancers that handle:
    • Incoming traffic.
    • Traffic distribution to your frontend service.
  • Containerized apps that are deployed as serverless services:
    • A web-based frontend.
    • An API layer in the middle tier.
  • A SQL database backend.
  • An in-memory cache that serves frequently accessed data.

Products used

The application contains the following Google Cloud products:

  • Cloud Load Balancing (optional): A service that provides high-performance, scalable load balancing on Google Cloud.
  • Cloud Run : A fully managed service that lets you build and deploy serverless containerized apps. Google Cloud handles scaling and other infrastructure tasks so that you can focus on the business logic of your code.
  • Cloud SQL : A fully managed PostgreSQL database in Google Cloud. This frees you from database administration tasks so that you have more time to manage your data.
  • Memorystore for Redis : A service that provides application caching using a scalable, secure, and highly available in-memory service for Redis. This helps you provide low latency access and high throughput for heavily accessed data.

Architecture

The following image shows the components and connections in the application:

A three-tier web application in the design canvas. The application includes frontend, backend, and database components.

The following is the request processing flow of the application:

  1. A Cloud Load Balancing frontend receives external requests and distributes traffic to the Cloud Load Balancing backend.
  2. The Cloud Load Balancing backend distributes traffic to the Cloud Run service.
  3. A web-based Cloud Run frontend service renders an HTML client in the user's browser.
  4. The frontend service sends requests to an API layer, which is also deployed as a Cloud Run service.
  5. Memorystore for Redis caches and serves frequently read data.
  6. The API layer sends requests that it can't serve from the in-memory Redis cache to a Cloud SQL database.

What's next

Design a Mobile Site
View Site in Mobile | Classic
Share by: