Skip to content
← projects

Network Diagnostic API

Cloud / containerized services

A containerized Flask API for ping and DNS diagnostics, built and deployed to Google Cloud Run through Cloud Build.

Role
Solo project
Period
Jul 2026
Areas
Cloud / Software

Overview

A small web service that answers two common network questions: is a host reachable, and what IP address does a domain resolve to? It runs on Google Cloud and redeploys automatically from a build pipeline.

What I did

I wrote the API, packaged it as a container, and set up the pipeline that builds the image, stores it in Google's registry, and deploys it to Cloud Run.

Architecture

Flask app served by gunicorn inside a python:3.11-slim image with ping and DNS tools installed. Cloud Build builds and pushes to Artifact Registry, then runs `gcloud run deploy` to a managed Cloud Run service in us-central1.

System flow

  1. 01git push
  2. 02Cloud Builddocker build
  3. 03Artifact Registrypush image
  4. 04Cloud Runus-central1

Technical decisions

  1. 01No shell interpolationCommands run via subprocess with argument lists and a 10-second timeout, never through a shell string.
  2. 02Clear endpoint contract`/health`, `/ping?host=`, and `/dns?domain=` return JSON with explicit 400 errors for missing parameters and DNS lookup timing in ms.

Technologies

Python · Flask · gunicorn · Docker · Google Cloud Run · Cloud Build · Artifact Registry

Links