A team has a working application and wants to deploy small changes without managing servers first. Platform as a Service (PaaS) lets the team hand over source code while the platform identifies, builds, and runs the application. Heroku and Google App Engine are examples. This makes deployment easier, but the abstraction can cost more and limit access to underlying features. section 4.4 section 4.6
For a long-running Go service, make its status visible before deploying:
- Add a `/health` handler that returns JSON such as `{"status":"up"}`. section 4.6
- Register the handler with the HTTP server and listen on the platform-provided `PORT`, falling back to `8080` locally. section 4.6
- Configure liveness and readiness checks against `/health`. A failed check can cause the platform to restart the application or mark a deployment as failed. section 4.6
Listing 4.8 app.yaml
runtime: go116 main: ./cmd liveness_check: path: "/health" check_interval_sec: 30 timeout_sec: 4 failure_threshold: 2 success_threshold: 2 readiness_check: path: "/health" check_interval_sec: 5 timeout_sec: 4 failure_threshold: 2 success_threshold: 2 app_start_timeout_sec: 300
The `app.yaml` example sets the Go runtime and points both liveness and readiness checks at `/health`. section 4.6
Listing 4.9 pipeline.yml
name: CI Checks
on:
push:
branches:
- main
jobs:
...
deploy-paas:
name: Deploy PaaS
runs-on: ubuntu-latest
needs: test
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Deploy App
id: deploy
uses: google-github-actions/deploy-appengine@main
with:
credentials: ${{ secrets.gcp_credentials }}
- id: test
run: curl "${{ steps.deploy.outputs.url }}/translate/hello"
The pipeline example deploys with a GitHub Actions App Engine action after tests, then calls the deployed application URL. section 4.6
PaaS sits between managing more infrastructure yourself and deploying a single function. It offers a more complete server for an application than Function as a Service (FaaS), while keeping deployment straightforward. Choose the abstraction that helps the team release and gather feedback now; revisit its cost and control limits as the product grows. section 4.4 section 4.7



